dsk1234
asked on
stored procedure in sql server 2005
I have a stored procedure in sql server 2005 that takes 3 input parameters that will update
a table
My requirement is to update 6 records ie
exec samplesp '1','a','x'
exec samplesp '2','b','x'
exec samplesp '3','c','x'
exec samplesp '4','d','x'
exec samplesp '5','e','x'
exec samplesp '6','f','x'
In the above, instead of calling stored proc 6 times, is there any better way we can do this calling once and updating all 6 records
a table
My requirement is to update 6 records ie
exec samplesp '1','a','x'
exec samplesp '2','b','x'
exec samplesp '3','c','x'
exec samplesp '4','d','x'
exec samplesp '5','e','x'
exec samplesp '6','f','x'
In the above, instead of calling stored proc 6 times, is there any better way we can do this calling once and updating all 6 records
Here quite a detailed description of various techniques to do this:
http://www.sommarskog.se/arrays-in-sql-2005.html
http://www.sommarskog.se/arrays-in-sql-2005.html
Hi,
If you can share your proc den we can help you out....
If you can share your proc den we can help you out....
ASKER
without modifying existing store proc , while executing can we achieve ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
what yo u can do is.....
create 3 param as varchar and pass it as comma seperator....