Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
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 stringDaveHelixpoint Web Developmenthttp://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,listsMike"oh, that monkey is going to pay"
sodeep
Master Smack Fu Yak Hacker
7174 Posts
Posted - 2009-02-19 : 20:12:50
http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htmCan you elaborate on update thing? How you wanna show expected ouput?
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 = 1where ','+@param1+',' like '%,'+cast(IdCol as varchar(8)) + ',%'