General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
>I'm trying to avoid an Update SP that updates *every* column and instead have an SP that only updates what is sent to it.
>
>~~Bonnie
To do that, woouldn't you need to use dynamic SQL? As the link that Sergey gave you someone stated, the overhead of doing dynamic SQL in the SP would eliminate any speed advantage using the SP would give you. Of course, if you are only using the SP fo security reasons, I guess you could do it.
Also, if you want you could build the SET part of the UPDATE statement in the client and send that as one string to the SP, which would then build the final update statement and EXEC() it.
BOb
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only