Originally posted by: tcarnes
I am trying to create a Stored Procedure that will update respective tables based on the table name variable passed in. This is what I've tried that isn't working:
For production, the best to write hard-wired, table-specific stored procedure due to performance and maintenance consideration.
While dynamic SQL appears to be "object-oriented", it is not, more like compiler preprocessing, also opens the sproc to SQL injection attacks.
Kalman Toth - Database, Data Warehouse & Business Intelligence Architect
SQL Server Training, SSAS, SSIS, SSRS: http://www.sqlusa.com/