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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 seperate string with the delimiter...

Author  Topic 

davidk
Starting Member

5 Posts

Posted - 2009-02-04 : 19:35:38
Hi,

I have a string like this which is passing from the front end
str = 'id1-s1,s2,s3|id2-s4,s5,s6'

On the backend i need to seperate first id1 and then s1 and s2 and s3 then i need to seperate pipe seperator. The same process, id2 first and then s4 and s5 and s6.

After seperating the string, i have to update those values into the table

Update tbl1 set field1 = s1,field2 = s2,field3 = s3 where id = id1
and again
Update tbl1 set field1=s4,field5 = s5,field6 = s6 where id = id2

Can any help me on this
Advance thanks

Nageswar9
Aged Yak Warrior

600 Posts

Posted - 2009-02-05 : 00:07:16
Don't Post Duplicates
Go to Top of Page
   

- Advertisement -