I have several tables I want to use a stored procedure with but I'm having trouble assigning the table name to a varialble, and then using in a select statement.
This does not work....What's the proper syntax?
Declare @TblNme varchar(25)
select @TblNme = 'MyTable'
Select * From @TblNme
Sybase just says Incorrect syntax near '@DataTbl'
This does not work....What's the proper syntax?
Declare @TblNme varchar(25)
select @TblNme = 'MyTable'
Select * From @TblNme
Sybase just says Incorrect syntax near '@DataTbl'