declare @table varchar(14)
set @table = select name from dbo.sysobjects where left(name,14)='ee_tablename_2'
IF EXISTS(select 1 from dbo.sysobjects where LEFT(name,14)='ee_tableName_2')
drop table @table
each day the table is going to be ee_tablename_YYYYMMDD, where the date is previous day.
I only want to keep them around for a 24 hr period, blowing them out each night before creating the new one.
i figured i could do a LEFT/SUBSTRING on name from sysobjects, but I can't get the DROP done syntactically.
'incorrect syntax neer '@table'.