January 13, 2010 at 6:19 am
Hi,
I am using a tool which gives comma seperated quoted string at runtime
ex: 'uniqueidentifier1', 'uniqueidentifier2','uniqueidentifier3',......
The string can also contain nulls ex: 'uniqueidentifier1', 'uniqueidentifier2',''
I need to parse the input and put it into a temporary table.
I have written a function which takes input using a temp variable @temp = " 'uniqueidentifier1', 'uniqueidentifier2','uniqueidentifier3'" .
It is working for small number of strings whose length is less than 128 characters.
Any help would be appreciated.
Cheers,
Tagore
January 13, 2010 at 6:34 am
Please have a look at the TallyTable article linked in my signature. It describes a pretty fast method to split a string.
January 15, 2010 at 9:25 pm
Set QUOTED_IDENTIFIER OFF did the trick.
Thanks.
January 16, 2010 at 10:52 am
dhanu-1026978 (1/15/2010)
Set QUOTED_IDENTIFIER OFF did the trick.Thanks.
Maybe it made it work for > 128 characters but what about performance? My recommendation would be to post the code for the function and let us have a go at it... especially if the function contains the word "WHILE" or "WITH" anywhere in it.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply