but can TSQLScript result as tdateset? 1: select top 1 * into #x from r_sale; select * from #x 2:declare @busno VARCHAR(10) select @busno='0001' CREATE TABLE #wareid ...... select * from #wareid where busno=@busno