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 2000 Forums
 SQL Server Development (2000)
 looping through comma delimited string to get ID numb's

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-09-10 : 08:55:40
Phil writes "Hello,

I have a string something like this:

'id1,id2,id3,id4'

that I would like to do some work with each id#. Does anyone have a good way to loop through this string and obtain the next id#? For instance I want to start and do on update on id1, then the next time id2 and then mabey it's id4.. I don't know what the order will be this is just an example. The only constant I know I need to parse the string and get the unique id's and the string is comma delimited.

I hope this makes sense.

Thanks,
Phil"

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-09-10 : 08:59:04
this might help:

http://www.sqlteam.com/item.asp?ItemID=11499

Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -