Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: MERGE COMMAND WITH DECODE AND INNER SELECT
Yes the information about the ORACLE version, and operating system
applies for the remote DB as well.
I am in the process of testing the MERGE locally. DBA is helping me copy the tables in the local database.
Meanwhile, what I have obeserved, is that the MERGE command above works properly if I replace the column inside the decode below with any other column, say FEE.RQST_PYMT_PROC_DT. The rows after the MERGE command executes successfully, contain values of 'Y' as well as 'N' for the column ABND_ELEC_PYMT_FEE_IN, depending upon the data.
DECODE( NVL(p.ELEC_PYMT_FEE_ID,0),0,'Y', 'N') AS ABND_ELEC_PYMT_FEE_IN. Is there a chance that the MERGE is not able to resolve the ambiguity on column, ELEC_PYMT_FEE_ID since I am using this as part of the join clause twice , a second time to do a self join ?The column ELEC_PYMT_FEE_ID , is present in ELEC_PYMT as well as ELEC_PYMT_FEE tables.May be it is always resolving the column to be from the ELEC_PYMT_FEE table, and since FEE.ELEC_PYMT_FEE_ID is never null, the DECODE statement always evaluates to a 'N'.
Thanks
David
Received on Thu Aug 25 2005 - 12:43:28 CDT
![]() |
![]() |