how can i use a variable for the table name?
declare @table_name varchar(2000)
set @table_name = 'mytable'
I would have thought it was that easy, but it wants me to declare the table variable. i read up on table variables, and that talks about storing values...not wanting to do that.