存储过程里 调用 Sequences的方法是怎么样的!?写: SEQ_CT_TOTALABNORMITYRST.nextval报ORA-00936:缺失表达式使用时还用提前声明嘛?~
insert into BW_CT_TotalAbnormityRst (RegisterSID,CorpSID,StatMonth,CustomerSID,SaleQuantity,LastMonthQty,Increase1,AvgQuantity,Increase2,Dispersion,STATUS) values
select SEQ_CT_TOTALABNORMITYRST.nextval, A.CorpSID,
V_Statmomth,
A.CustomerSID,
A.TOTALQUANTITY,
A.LASTMONTHQTY,
A.INCREASE1,
A.AVGQUANTITY,
A.INCREASE2,
A.DISPERSION,
'00'
FROM (...................
insert into BW_CT_TotalAbnormityRst (RegisterSID,CorpSID,StatMonth,CustomerSID,SaleQuantity,LastMonthQty,Increase1,AvgQuantity,Increase2,Dispersion,STATUS) values
select SEQ_CT_TOTALABNORMITYRST.nextval, A.CorpSID,
V_Statmomth,
A.CustomerSID,
A.TOTALQUANTITY,
A.LASTMONTHQTY,
A.INCREASE1,
A.AVGQUANTITY,
A.INCREASE2,
A.DISPERSION,
'00'
FROM (...................
或者
insert into t(a,b,c)
select xx,xx,xx
from t2
where ...