>>exec sp_executesql N'-- NAOMIN/ADMIN sysmanager:item_edit.sct:my_dataform.dataenvironment.opentables:81 >> >>if object_id(''tempdb..#csrI_Item'') is not null drop table #csrI_Item >>select * >> into #csrI_Item >> from i_items >> where department = @P1 --''RETAIL '' >> and category = @P2 --''BK-CHILD '' >> and item = @P3 --''ALICE '' >>SELECT * from #csrI_Item',N'@P1 varchar(10),@P2 varchar(10),@P3 varchar(10)','RETAIL ','BK-CHILD ','ALICE ' >> >>-- and then the next batch which is failing >> >>-- NAOMIN/ADMIN sysmanager:item_edit.sct:my_dataform.dataenvironment.opentables:88 >> >>select * from i_attlnk WHERE invent_id in (select invent_id FROM #csrI_Item) >>DROP TABLE #csrI_Item>>