adimit
asked on
T-SQL sql server 2005 execute command by passing a variable
I would like to execute simple commands such as the following:
delete @tablename
insert into @tablename .......
where @tablename is a varchar parameter I pass to the stored procedure.
How can i do this
delete @tablename
insert into @tablename .......
where @tablename is a varchar parameter I pass to the stored procedure.
How can i do this
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you, I was missing the parentheses around the variable name in the exec command
http://msdn.microsoft.com/en-us/library/ms188332.aspx