能。//CREATE TABLE #te (局部)
//CREATE TABLE ##te (全局)
dmInventory.qinvd.close;
dmInventory.qinvd.sql.text:=' CREATE TABLE #te ('+
'gperm2 smallint, grade char(2), w1 float null, b1 float null, w2 float null, b2 float null, '+
'w3 float null, b3 float null, w4 float null, b4 float null, w5 float null, b5 float null, '+
'w6 float null, b6 float null, w7 float null, b7 float null, w8 float null, b8 float null, '+
'w9 float null, b9 float null, w10 float null, b10 float null, wRoll float null, bRoll float null, '+
'inv float null, invb float null )'+
'declare @gperm2 smallint declare @grade char(2) declare @w1 float declare @b1 float '+
'declare @w2 float declare @b2 float declare @w3 float declare @b3 float declare @w4 float '+
'declare @b4 float declare @w5 float declare @b5 float declare @w6 float declare @b6 float '+
'declare @w7 float declare @b7 float declare @w8 float declare @b8 float declare @w9 float '+
'declare @b9 float declare @w10 float declare @b10 float declare @wRoll float declare @bRoll float '+
'declare @inv float declare @invb float '+
'declare c_InvStruc cursor for select distinct gperm2,grade from inventory i,vproductdata v,stores s '+
'where i.productno=v.productno and s.storeNo=i.storeNo and s.status=''n'' and s.compNo="0000" and (i.weight<>0 or i.wtemp<>0 or i.wbooked<>0 or wway<>0) ';
dmInventory.qinvd.open;