I use this code:
select @SQLString=N'select ....(long select query).....'
+ char(10) + '; drop table _item_list '
and afterwards
insert @tbl EXEC dbo.sp_executesql @SQLString
It seems to be working, but can someone give me some clear info on this? I was expecting the executesql thing to have to be "faithful", as in related in its entirety, to the insert statement preceding it. It seems however that it has no problem feeding the select to the insert, and doing the drop table independently. Also, is the ; before the drop necessary?