Hi,
Is there a way to pass a table name as a parameter
in a stored procedure?
I want to be able to have a general stored procedure
that will perform an operation on a table whose name is passed to the stored procedure as a variable.
I tried to pass
it as a varchar. Then using something like
select * from @tablename, but I get errors
if I try that, It does not seem that the
table is sent as a variable that way. Is there a way
to send a table as a variable?
thanks
sagn
Is there a way to pass a table name as a parameter
in a stored procedure?
I want to be able to have a general stored procedure
that will perform an operation on a table whose name is passed to the stored procedure as a variable.
I tried to pass
it as a varchar. Then using something like
select * from @tablename, but I get errors
if I try that, It does not seem that the
table is sent as a variable that way. Is there a way
to send a table as a variable?
thanks
sagn