/* problem */
can not use Sq_Rakshakfreshpledge.nextval direct in remote table
Insert into tblRkfreshpledge@lnk_Rakshak (dTransactiondate,nTransactionno,nSegmenttype,cClientcode,cIsincode,nT2Tscrip,nHaircut,nPledgestock,nMarketvalue,dEntrytime,
cTransmitted,dTransmittime) Values (:Old.Dtoftran,Sq_Rakshakfreshpledge.nextval,lnCommodity,lcTerminalcode,lcIsincode,lnT2Tscrip,lnHaircut,
(:new.nUsablepledgestock-:Old.nUsablepledgestock),(:new.nUsablepledgestock-:Old.nUsablepledgestock)*lnMarketrate*lnHaircut,Sysdate,'N',null) ;
Solution
Select Ldbo.Sq_Rakshakfreshpledge.nextval into lnTransactionno From dual ;
Insert into tblRkfreshpledge@lnk_Rakshak (dTransactiondate,nTransactionno,nSegmenttype,cClientcode,cIsincode,nT2Tscrip,nHaircut,nPledgestock,nMarketvalue,dEntrytime,
cTransmitted,dTransmittime) Values (:Old.Dtoftran,lnTransactionno,lnCommodity,lcTerminalcode,lcIsincode,lnT2Tscrip,lnHaircut,
(:new.nUsablepledgestock-:Old.nUsablepledgestock),(:new.nUsablepledgestock-:Old.nUsablepledgestock)*lnMarketrate*lnHaircut,Sysdate,'N',null) ;
No comments:
Post a Comment