Thursday, July 16, 2020

ORA-22816: unsupported feature with RETURNING clause in trigger

Restrictions

The following restrictions apply to the RETURNING clause:

The expr is restricted as follows:

Each expr must be a simple expression or a single-set aggregate function expression. You cannot combine simple expressions and single-set aggregate function expressions in the same returning_clause.

Single-set aggregate function expressions cannot include the DISTINCT keyword.

You cannot specify the returning_clause for a multitable insert.

You cannot use this clause with parallel DML or with remote objects.

You cannot retrieve LONG types with this clause.

You cannot specify this clause for a view on which an INSTEAD OF trigger has been defined.

 

ORA-22816: unsupported feature with RETURNING clause

ORA-06512: at "LDBO.TG_RKPOAPLEDGEUPDATE", line 36

ORA-04088: error during execution of trigger 'LDBO.TG_RKPOAPLEDGEUPDATE'


Problematic Command

update tblrktodel@lnk_Rakshak set nPoastocks=nPoastocks+........

        Where cClientcode=lcTerminalcode and cIsincode=lcIsincode and nSegmenttype=lnCommodity and nSourcetable=0 returning nHaircut,nT2Tscrip into lnHaircut,lnT2TScrip ;


Solution

Begin

           Select tblRktodel.nHaircut,tblRktodel.nT2Tscrip into lnHaircut,lnT2Tscrip From tblrktodel@lnk_Rakshak Where dTransactiondate=:Old.Dtoftran and cClientcode=lcTerminalcode and cIsincode=lcIsincode and nSegmenttype=lnCommodity and nSourcetable=0 ;

        Exception 

            When NO_DATA_FOUND then 

                lnHaircut:=0 ;

                lnT2Tscrip:=0 ;

        End ;           


No comments:

Post a Comment

Followers