I have an string
declare @s varchar(100),
set @s='aaaa,bbbb,cccc'
declare @first varchar(100),
declare @second varchar(100),
declare @third varchar(100)
Now I need to split these strings into three variable holding there values like this
@first=aaaa
@second=bbbb
@third=cccc
If I am using the split function then I get the output like this
aaaa
bbbb
cccc
Is there any better way we can achieve this result? Any help would be appreciated.
I want this result into a variable because I need it for further processing
Thanks