I did make the changes how ever the function is created but its not giving me expected results I am guessing its because of return not in the loop if can you explane me it just returns NULL as of now
This function is splitting the string 'm1,m2,m3' into
m1
m2
m3
I made few more correction can you check this
create function fun_split
(
@string varchar(20)
)
RETURN char(5)
begin
declare @b int,@c varchar(5), @d varchar(5)
set @d = replace('@string',',','.')
set @b=0
while(@b<4)
begin...
Hi I am beginner to sqlserver and facinf a problem with functions can I get some help on it.
Here is my programm
create function fun_split
(
@string varchar(20)
)
RETURN char(5)
begin
declare @b int,@c char(5)
set @string = replace('m1,m2,m3',',','.')
set @b=0
while(@b<4)
begin...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.