Link to home
Start Free TrialLog in
Avatar of adimit
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
ASKER CERTIFIED SOLUTION
Avatar of cyberkiwi
cyberkiwi
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of adimit
adimit

ASKER

thank you, I was missing the parentheses around the variable name in the exec command