文件名称:UNION ALL 的使用方法
文件大小:706B
文件格式:SQL
更新时间:2022-07-23 02:32:55
UNION
SELECT NVL(SUM(A.AMOUNT),0) INTO W_ATS_RE_BOOKED_AMT FROM XXXXXXXXX A, ( SELECT B.TRD_NO FROM XXXXXXXXX B WHERE B.CLIENT_CD = W_IN_CLIENT_CD UNION ALL SELECT C.TRD_NO FROM XXXXXXXXX C WHERE C.CLIENT_CD = W_IN_CLIENT_CD ) D WHERE A.TRD_NO = D.TRD_NO AND A.CLIENT_CD = W_IN_CLIENT_CD AND A.RESULT IS NULL ;