declare cursor1 cursor for select name from sysobjects where xtype='u' and status>0 and (left(name,3) in ('SST','TCT'))
declare @i varchar(1000)
open cursor1
fetch cursor1 into @i
while @@fetch_status=0
begin
exec('drop table '+@i)
fetch cursor1 into @i
end
close cursor1
deallocate cursor1
declare @a varchar
select @a = name from sysobjects where xtype = 'U' and name like 'SST%'
while @a is not null
begin
exec('drop table ' + @a)
select @a = name from sysobjects where xtype = 'U' and name like 'SST%'
end