Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
subhaoviya
Posting Yak Master
135 Posts |
Posted - 2009-11-03 : 23:31:08
|
| am having a string, and delimiter comma @mainstring='a,b,c,d',@delimiter=','i want to split this string value into array. how to do this in sqlthankssubha |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-11-04 : 00:00:03
|
seeCSVTablefnParseList KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
waterduck
Aged Yak Warrior
982 Posts |
Posted - 2009-11-04 : 00:14:25
|
@mainstring='a,b,c,d',@delimiter=','@mainstring = 'INSERT INTO @temp SELECT '' + @mainstringreplace ',' to ''''' UNION SELECT ''''''exec(@mainstring)Select * from @temp Hope can help...but advise to wait pros with confirmation... |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-11-04 : 01:22:47
|
quote: Originally posted by waterduck @mainstring='a,b,c,d',@delimiter=','@mainstring = 'INSERT INTO @temp SELECT '' + @mainstringreplace ',' to ''''' UNION SELECT ''''''exec(@mainstring)Select * from @temp Hope can help...but advise to wait pros with confirmation...
Hey Ducky, what are you drinking? No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-11-04 : 01:42:00
|
quote: Originally posted by webfred
quote: Originally posted by waterduck @mainstring='a,b,c,d',@delimiter=','@mainstring = 'INSERT INTO @temp SELECT '' + @mainstringreplace ',' to ''''' UNION SELECT ''''''exec(@mainstring)Select * from @temp Hope can help...but advise to wait pros with confirmation...
Hey Ducky, what are you drinking? No, you're never too old to Yak'n'Roll if you're too young to die.
WATER? MadhivananFailing to plan is Planning to fail |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-11-04 : 01:49:03
|
LOL  KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|
|
|