Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: MERGE COMMAND WITH DECODE AND INNER SELECT

Re: MERGE COMMAND WITH DECODE AND INNER SELECT

From: srini <srini.upp_at_gmail.com>
Date: 25 Aug 2005 10:43:28 -0700
Message-ID: <1124991808.335479.11740@g14g2000cwa.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US