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)
 updating multiple records

Author  Topic 

helixpoint
Constraint Violating Yak Guru

291 Posts

Posted - 2009-02-19 : 20:03:06
Is there a way to send a stored proc a comma seperated string of numbers and do an udate on a bit in each record. I want to change it to true for each id number in the string

Dave
Helixpoint Web Development
http://www.helixpoint.com

mfemenel
Professor Frink

1421 Posts

Posted - 2009-02-19 : 20:12:30
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=Splitting,delimited,lists


Mike
"oh, that monkey is going to pay"
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-19 : 20:12:50
http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htm

Can you elaborate on update thing? How you wanna show expected ouput?
Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2009-02-19 : 20:47:37
You can try something like this:
update YourTable set bitDataCol = 1
where ','+@param1+',' like '%,'+cast(IdCol as varchar(8)) + ',%'
Go to Top of Page
   

- Advertisement -