June 17, 2010 at 3:07 pm
I have a stored procedure that is currently doing an update based on the primary key value that is being passed in the parameter. I want to be able to send a range of primary key values in the same parameter and then do the update all in one step. Is this possible?
Tahnks
June 17, 2010 at 3:25 pm
Yes.
You could provide the primary keys as a comma separated list (without blanks) and use a split string function to covert that list into a table (search for DelimitedSplit8K on this site to find an excellent performing solution).
As a result, you'd get a table with your primary keys you could use ina join ofn your update statement.
June 17, 2010 at 3:34 pm
Great! Thanks again for another set-based solution for me, Lutz!
June 17, 2010 at 3:43 pm
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply