Column Ambiguosly Define error

Hi,
I have a query that goes like this
select * from
(      select a.data1, b.data2
     from table1 a, table2 b
     where a.xxx = b.xxx
union all     
     select a1.data1, b1.data2
     from table11 a1, table21 b1
     where a1.xxx1 = b1.xxx1
union all     
     select a2.data1, b2.data2
     from table31 a2, table32 b2
     where a2.xxx2 = b2.xxx2
when i run this query, i get the error "*Column Ambiguosly Defined*" error. However when i run the query without hte explicit select i.e.
select a.data1, b.data2
     from table1 a, table2 b
     where a.xxx = b.xxx
union all     
     select a1.data1, b1.data2
     from table11 a1, table21 b1
     where a1.xxx1 = b1.xxx1
union all     
     select a2.data1, b2.data2
     from table31 a2, table32 b2
     where a2.xxx2 = b2.xxx2
this query returns valid data. i need this data to be part of a custom report and need to add the select * from to the whole result set.
Please respond to this query and provide me with a valid solution for the same.
Thanks in advance
Bharath

Your constant re-posting of this message is NOT increasing your chances of getting a solution.
This forum is not a chat line, and it is not paid support.
No one is responsible for monitoring it and giving a quick response.
Furthermore, it is a global forum. The person with the information you seek may very well live 20 time zones away from you and was going to bed just as you posted. He will not even see your post for several more hours.
Your original post went up in the middle of the night for half the world.
No one with the information you seek is deliberately withholding it until you sound sufficiently desperate.

Similar Messages

  • Getting error Column ambiguosly defined even though column is referenced

    select dh_events.case_id
         FROM ah_events_to_drgs FULL OUTER JOIN dh_events
    ON ah_events_to_drgs.case_id=dh_events.case_id
         and ah_events_to_drgs.case_id='2007SP000006'
    getting error Column ambiguosly defined even though column is referenced, Please let me know why it is giving error.
    Thanks
    Murthy

    Could you demonstrate this in details ?
    SQL> create table ah_events_to_drgs (case_id varchar2(20));
    Table created.
    SQL> create table dh_events (case_id varchar2(20));
    Table created.
    SQL> select dh_events.case_id
      2  FROM ah_events_to_drgs FULL OUTER JOIN dh_events
      3  ON ah_events_to_drgs.case_id=dh_events.case_id
      4  and ah_events_to_drgs.case_id='2007SP000006'
      5  /
    no rows selected
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - ProductionRgds

  • Oracle 11g bug for column ambigously defined error

    I have below format query running on Oracle 10g without any issues
    select col1
    from (select col1
    from (select 'A' col1
    from dual)
    ) v1
    inner join (select col1 as col2
    from (select 'A' col1
    from dual)
    ) v2
    on (v1.col1=v2.col2);
    When I run the exact same query on Oracle 11g I get column ambiguously defined error. But when I change the query to as below it works fine on 11g
    select v1.col1
    from (select col1
    from (select 'A' col1
    from dual)
    ) v1
    inner join (select col1 as col2
    from (select 'A' col1
    from dual)
    ) v2
    on (v1.col1=v2.col2);
    Is it because 11g ignores column alias in my inner queries.

    I'd tend to agree that this seems to be a bug in 11.1.0.7 (at least, that's the version I'm running it in)
    It's not even that Oracle doesn't know about the column aliases, you can remove the aliases in the ON without a problem, i.e.
    SELECT v1.col1
       FROM
      (SELECT col1 FROM
        (SELECT 'A' col1 FROM dual
      ) v1
    INNER JOIN
      (SELECT col1 AS col2 FROM
        (SELECT 'A' col1 FROM dual
      ) v2
         ON (col1=col2);works fine. Using the old join syntax also seems to work fine
    SELECT col1
       FROM
      (SELECT col1 FROM
        (SELECT 'A' col1 FROM dual
      ) v1,
      (SELECT col1 AS col2 FROM
        (SELECT 'A' col1 FROM dual
      ) v2
      WHERE (col1=col2);So it appears that something in the SQL 99 parser is broken. Have you logged a bug in Metalink?
    Justin

  • Column Ambigiously defined error message

    I'm getting Column Ambigiously defined error message. How do I fix it ?
    select c.guid,d.teritorryname,a.permission,e.CLASSIFICATIONNAME from Apps_PERMISSION a , Apps_PERMISSION_CLASSIFICATION b , Apps_USER_MASTER c ,Apps_TERRITORY_MASTER d , Apps_CLASSIFICATION_MASTER e where a.PERMISSIONID=b.PERMISSIONID and a.TERRITORYID=d.TERRITORYID and a.USERID=c.USERID and b.CLASSIFICATIONID=e.CLASSIFICATIONID and a.USERID IN (select userid from Apps_USER_MASTER ) order by userid

    May be
    select c.guid,d.teritorryname,
    DECODE(a.permission,1,'Create',2,'View',3,'Edit'),
    e.CLASSIFICATIONNAME from Apps_PERMISSION a , Apps_PERMISSION_CLASSIFICATION b , Apps_USER_MASTER c ,Apps_TERRITORY_MASTER d , Apps_CLASSIFICATION_MASTER e where a.PERMISSIONID=b.PERMISSIONID and a.TERRITORYID=d.TERRITORYID and a.USERID=c.USERID and b.CLASSIFICATIONID=e.CLASSIFICATIONID and a.USERID IN (select userid from Apps_USER_MASTER ) order by a.useridOr you can use CASE also.

  • "column ambigously defined" error

    ORA-00918: column ambigously defined
    00918.00000 - "column ambigously defined"
    *Cause:
    *Action
    Vendor code 918     
    I've gotten this error on a few of the queries I've ran in SQL Developer 1.5 and tried to export to xls, but when I run and try to export the same query in 1.2.1 it's fine. There is another popup box that provides this detail (below). What causes this error and how can it be fixed?
    java.lang.NullPointerException
         at oracle.dbtools.raptor.dialogs.export.ColumnPanel.addColumnsToTree(ColumnPanel.java:85)
         at oracle.dbtools.raptor.dialogs.export.ColumnPanel.showPanel(ColumnPanel.java:61)
         at oracle.dbtools.raptor.dialogs.export.ColumnPanel.<init>(ColumnPanel.java:50)
         at oracle.dbtools.raptor.dialogs.actions.TableExportAction.showPanels(TableExportAction.java:291)
         at oracle.dbtools.raptor.dialogs.actions.TableExportAction.launchDlg(TableExportAction.java:189)
         at oracle.dbtools.raptor.format.ui.ExportContextMenuListener$1.actionPerformed(ExportContextMenuListener.java:137)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    The problem is that SQL Developer 1.5.0/1 generates and executes a query that is not quite your original query to assist with the export dialog (presumably to populate the Columns tab). Note that it also does a single bulk fetch against this query, which can cause performance issues when trying to export the results of long running queries.
    For the example query of:
    select t.id, t2.id from t,t2;
    this generated query is:
    select * from ( select "ID","ID" from ( select t.id, t2.id from t,t2 ) )
    The export works in 1.2.1 simply because they did not generate this additional query, but re-executed the original query.
    theFurryOne

  • Getting an error-column ambigiusly defined

    MERGE INTO TEMP_MED_PARTIAL_RECORDS_0002 Tmpr
    USING (SELECT callstart,
    seqno,
    totduration,
    callreleasetime mplcallreleasetime,
    connectedcallingnumber mplconnectedcallingnumber,
    mplimsi,
    mplchargingid,
    msisdn mplsisdn,
    FILEID mplfileid,
    FILENAME mplfilename,
    SLNO mplslno,
    IMEI mplimei,
    UTCTIMEOFFSET mplutctimeoffset,
    CAUSEFORTERMINATION mplcausefortermination,
    CALLTYPE mplcalltype,
    SERVICETYPE mplservicetype,
    SERVICECODE mplservicecode,
    SUPPLSERVICECODE mplsupplservicecode,
    DIALLEDDIGITS mpldialleddigits,
    CONNECTEDCALLINGNUMBER mplconnectedcallingnumber,
    THIRDPARTYNUMBER mplthirdpartynumber,
    RECORDINGENTITYIDENTIFICATION mrecordingentityidentification,
    CALLREFERENCE mplcallreference,
    ACCESSPOINTNAMENI mplaccesspointnameni,
    ACCESSPOINTNAMEOI mplaccesspointnameoi,
    SGSNADDRESS mplsgsnaddress ,
    GGSNADDRESS mplggsnaddress,
    CHARGEAMOUNT mplchargeamount,
    MSISDN mmsisdn,
    PDPADDRESS mplpdpaddress,
    PLMNID mplplmnid ,
    CELLID mplcellid ,
    LOCATIONAREACODE mpllocationareacode ,
    RES_1 mplres1,
    RES_2 mplres2,
    RES_3 mplres3,
    RES_4 mplres4,
    RES_5 mplres5,
    CALLRELEASETIME mplcallreleasetime
    FROM (
    SELECT MIN (CALLEVENTSTARTTIMESTAMP) callstart,
    MAX (sequence_number) seqno,
    SUM (CALLEVENTDURATION) totduration,
    imsi mplimsi,
    SUM(DATAVOLUMEINCOMING) download,
    SUM(DATAVOLUMEOUTGOING) upload,
    chargingid mplchargingid
    FROM MED_PARTIAL_RECORDS_0002_LOAD
    GROUP BY chargingid,imsi
    ) subset ,
    (select FILEID ,
    FILENAME ,
    SLNO ,
    IMEI ,
    UTCTIMEOFFSET ,
    CAUSEFORTERMINATION ,
    CALLTYPE ,
    SERVICETYPE ,
    SERVICECODE ,
    SUPPLSERVICECODE ,
    DIALLEDDIGITS ,
    CONNECTEDCALLINGNUMBER ,
    THIRDPARTYNUMBER ,
    RECORDINGENTITYIDENTIFICATION ,
    CALLREFERENCE ,
    ACCESSPOINTNAMENI ,
    ACCESSPOINTNAMEOI ,
    SGSNADDRESS ,
    GGSNADDRESS ,
    CHARGEAMOUNT ,
    MSISDN ,
    PDPADDRESS ,
    PLMNID ,
    CELLID ,
    LOCATIONAREACODE ,
    RES_1 ,
    RES_2 ,
    RES_3 ,
    RES_4 ,
    RES_5,
    callreleasetime,
    sequence_number,
    imsi,
    chargingid
    from MED_PARTIAL_RECORDS_0002_LOAD
    ) subsetinfo
    where
    SUBSETINFO.IMSI=subset.mplimsi
    and
    subsetinfo.chargingid=subset.mplchargingid
    and
    subsetinfo.sequence_number=subset.seqno
    mpl
    on
    (tmpr.imsi=mpl.mplimsi
    and
    tmpr.chargingid=mpl.mplchargingid
    and
    tmpr.sequence_number=mpl.seqno+1
    WHEN MATCHED THEN ---------------------column ambigiously defined
    update SET sequence_number=seqno,
    CALLEVENTDURATION= totduration,
    datavolumeincoming =downloabytes,
    datavolumeoutgoing=uploadbytes;

    May be this error on following column names.
    Change aliases and try again
    connectedcallingnumber mplconnectedcallingnumber,
    CAUSEFORTERMINATION mplcausefortermination,
    CONNECTEDCALLINGNUMBER mplconnectedcallingnumber,
    RECORDINGENTITYIDENTIFICATION mrecordingentityidentification,
    ACCESSPOINTNAMENI mplaccesspointnameni,
    ACCESSPOINTNAMEOI mplaccesspointnameoi,
    LOCATIONAREACODE mpllocationareacode ,

  • Getting an error-column ambigiously defined

    DECLARE
    p_temptablename  VARCHAR2(30);
    p_loadtablename  VARCHAR2(30);
    p_retval  number;
    BEGIN
       p_retval := 0;
       MERGE INTO TEMP_MED_PARTIAL_RECORDS_0002 Tmpr
            USING (SELECT callstart,
                          seqno,
                          totduration,
                          callreleasetime mplcallreleasetime,
                          connectedcallingnumber mplconnectedcallingnumber,
                          mplimsi,
                          mplchargingid,
                          msisdn mplsisdn,
                          FILEID mplfileid,
                          FILENAME mplfilename,
                          SLNO mplslno,
                          IMEI mplimei,
                          UTCTIMEOFFSET mplutctimeoffset,
                          CAUSEFORTERMINATION mplcausefortermination,
                          CALLTYPE  mplcalltype,
                          SERVICETYPE mplservicetype,
                          SERVICECODE  mplservicecode,
                          SUPPLSERVICECODE  mplsupplservicecode,
                          DIALLEDDIGITS mpldialleddigits,
                          CONNECTEDCALLINGNUMBER mplconnectedcallingnumber,
                          THIRDPARTYNUMBER mplthirdpartynumber,
                          RECORDINGENTITYIDENTIFICATION   mrecordingentityidentification,
                          CALLREFERENCE  mplcallreference,
                          ACCESSPOINTNAMENI   mplaccesspointnameni,
                          ACCESSPOINTNAMEOI     mplaccesspointnameoi,
                          SGSNADDRESS    mplsgsnaddress ,
                          GGSNADDRESS   mplggsnaddress,
                          CHARGEAMOUNT  mplchargeamount,
                          MSISDN  mmsisdn,
                          PDPADDRESS    mplpdpaddress,
                          PLMNID  mplplmnid  ,
                          CELLID   mplcellid ,
                          LOCATIONAREACODE  mpllocationareacode ,
                          RES_1 mplres1,
                          RES_2  mplres2,
                          RES_3  mplres3,
                          RES_4 mplres4,
                          RES_5 mplres5,
                          CALLRELEASETIME mplcallreleasetime
                     FROM (
                     SELECT MIN (CALLEVENTSTARTTIMESTAMP) callstart,
                                     MAX (sequence_number) seqno,
                                     SUM (CALLEVENTDURATION) totduration,
                                     imsi mplimsi,
                                    SUM(DATAVOLUMEINCOMING) download,
                                    SUM(DATAVOLUMEOUTGOING) upload,
                                    chargingid mplchargingid
                                FROM MED_PARTIAL_RECORDS_0002_LOAD
                            GROUP BY chargingid,imsi
                            ) subset ,
                            (select FILEID                   ,
      FILENAME                ,
      SLNO                    ,
      IMEI                          ,
      UTCTIMEOFFSET                 ,
      CAUSEFORTERMINATION           ,
      CALLTYPE                      ,
      SERVICETYPE                   ,
      SERVICECODE                   ,
      SUPPLSERVICECODE              ,
      DIALLEDDIGITS                 ,
      CONNECTEDCALLINGNUMBER        ,
      THIRDPARTYNUMBER              ,
      RECORDINGENTITYIDENTIFICATION ,
      CALLREFERENCE     ,
      ACCESSPOINTNAMENI ,
      ACCESSPOINTNAMEOI ,
      SGSNADDRESS             ,
      GGSNADDRESS             ,
      CHARGINGID       ,
      CHARGEAMOUNT     ,
      MSISDN           ,
      PDPADDRESS       ,
      PLMNID           ,
      CELLID           ,
      LOCATIONAREACODE ,
      RES_1   ,
      RES_2   ,
      RES_3   ,
      RES_4   ,
      RES_5,
      callreleasetime,
      sequence_number,
      imsi,
      chargingid
    from MED_PARTIAL_RECORDS_0002_LOAD
    ) subsetinfo
    where
    SUBSETINFO.IMSI=subset.mplimsi     -----------column abbigiuosly defined
    and
    subsetinfo.chargingid=subset.mplchargingid -----------column abbigiuosly def
    and
    subsetinfo.sequence_number=subset.seqno
    mpl
    on
    (tmpr.imsi=mplimsi
    and
    tmpr.chargingid=mplchargingid
    WHEN MATCHED THEN
    update SET sequence_number=seqno,
    --CALLEVENTSTARTTIMESTAMP=callstart,
    CALLEVENTDURATION= totduration,
    datavolumeincoming =downloabytes,
    datavolumeoutgoing=uploadbytes
    WHEN NOT MATCHED THEN
    INSERT (FILEID,
    FILENAME,SLNO,IMSI,IMEI,CALLEVENTSTARTTIMESTAMP,UTCTIMEOFFSET,CALLEVENTDURATION,CAUSEFORTERMINATION,CALLTYPE,
    SERVICETYPE,SERVICECODE,SUPPLSERVICECODE,DIALLEDDIGITS,            
      CONNECTEDCALLINGNUMBER,THIRDPARTYNUMBER,RECORDINGENTITYIDENTIFICATION,CALLREFERENCE,ACCESSPOINTNAMENI,ACCESSPOINTNAMEOI,DATAVOLUMEINCOMING,
      DATAVOLUMEOUTGOING,SGSNADDRESS,                  
      GGSNADDRESS,CHARGINGID,CHARGEAMOUNT,MSISDN,PDPADDRESS,PLMNID,CELLID,LOCATIONAREACODE,RES_1,RES_2,RES_3,RES_4,RES_5,CALLRELEASETIME,SEQUENCE_NUMBER                
    values
    (mplFILEID,mplFILENAME,mplSLNO,mplIMSI,mplIMEI,callstart,mplUTCTIMEOFFSET,totduration,mplCAUSEFORTERMINATION,mplCALLTYPE,mplSERVICETYPE,mplSERVICECODE,mplSUPPLSERVICECODE,
    mplDIALLEDDIGITS,mplCONNECTEDCALLINGNUMBER,mplTHIRDPARTYNUMBER,mRECORDINGENTITYIDENTIFICATION,mplCALLREFERENCE,mplACCESSPOINTNAMENI,mplACCESSPOINTNAMEOI,mplDATAVOLUMEINCOMING,mplDATAVOLUMEOUTGOING,mplSGSNADDRESS,                  
      mplGGSNADDRESS,mplCHARGINGID,mplCHARGEAMOUNT,mplMSISDN,mplPDPADDRESS,mplPLMNID,mplCELLID,mplLOCATIONAREACODE,mplRES1,mplRES2,mplRES3,mplRES4,mplRES5,callend,seqno);
    --commit
    exception
    when others then
    --ROLLBACK
    p_retval:=-1;
    p3_errorlog('partial_stiching',SQLERRM);
    --COMMIT;*/
    end;
    /

    Handle:  user8731258   
    Status Level:  Newbie 
    Registered:  Aug 20, 2009 
    Total Posts:  293 
    Total Questions:  129 (121 unresolved) 

  • Strange behaviuor (bug?) with view (ora-918 column ambiguously defined)

    Hallo everybody,
    the following code works as expected;
    select substr(fire_id,-4,2) as ct,zone_id, count(fire_id),sum(a_total) from
    (select *
    from fire right join fire_zone using (fire_id)
    where definition_id = 1
    and checked = 1
    and substr(fire_id,-4,2) in (21,23)
    and fire_id between 190400000000 and 200900000000)
    group by substr(fire_id,-4,2),zone_id
    order by ct, zone_id
    but when a define a view for the subquery:
    create or replace view tempfire as
    select *
    from fire right join fire_zone using (fire_id)
    where definition_id = 1
    and checked = 1
    and substr(fire_id,-4,2) in (21,23)
    and fire_id between 190400000000 and 200900000000
    and then run
    select substr(fire_id,-4,2) as ct,zone_id, count(fire_id),sum(a_total) from tempfire
    group by substr(fire_id,-4,2),zone_id
    order by ct, zone_id
    I got the error ora-00918 column ambiguously defined for zone_id.
    Is this a bug or is there a reason?
    Thank you in advance,
    Cheers,
    Boris
    Edited by: boris on Nov 19, 2009 6:49 AM
    Edited by: boris on Nov 19, 2009 6:52 AM

    user503699
    I followed your suggestion and now it works. Thank you !
    But something is strange ... this is the result of the desc tempfire ... and all the column names are different ...
    desc tempfire
    Name Null Type
    FIRE_ID NOT NULL NUMBER(12)
    START_DATE DATE
    END_DATE DATE
    LOCALITY VARCHAR2(56)
    X_COORD NUMBER(6)
    Y_COORD NUMBER(6)
    COORD_RELIABILITY_ID NUMBER(1)
    ALTITUDE NUMBER(4)
    SITE_ID NUMBER(1)
    EXPO_ID NUMBER(1)
    SLOPE NUMBER(3)
    X_BUSH NUMBER(1)
    X_COPPICE NUMBER(1)
    X_COPPICE_MIXED NUMBER(1)
    X_SELVA NUMBER(1)
    X_HIGH_FOREST_HARDWOOD NUMBER(1)
    X_HIGH_FOREST_SOFTWOOD NUMBER(1)
    X_HIGH_FOREST_MIXED NUMBER(1)
    X_PIONEER NUMBER(1)
    X_FORESTATION NUMBER(1)
    S_BUSH NUMBER(8,2)
    S_COPPICE NUMBER(8,2)
    S_COPPICE_MIXED NUMBER(8,2)
    S_SELVA NUMBER(8,2)
    S_HIGH_FOREST_HARDWOOD NUMBER(8,2)
    S_HIGH_FOREST_SOFTWOOD NUMBER(8,2)
    S_HIGH_FOREST_MIXED NUMBER(8,2)
    S_PIONEER NUMBER(8,2)
    S_FORESTATION NUMBER(8,2)
    A_FOREST NUMBER(8,2)
    A_GRASSLAND NUMBER(8,2)
    A_NONPRODUCTIVE NUMBER(8,2)
    A_TOTAL NUMBER(8,2)
    D_CASTANEA NUMBER(1)
    D_QUERCUS NUMBER(1)
    D_FAGUS NUMBER(1)
    D_BETULA NUMBER(1)
    D_OTHER_HARDWOOD NUMBER(1)
    D_PINUS NUMBER(1)
    D_PICEA NUMBER(1)
    D_LARIX NUMBER(1)
    D_OTHER_SOFTWOOD NUMBER(1)
    DIAMETER NUMBER(3)
    LITTER_ID NUMBER(1)
    HERB_LAYER_ID NUMBER(1)
    BUSH_LAYER_ID NUMBER(1)
    FIRE_SURFACE NUMBER(1)
    FIRE_CROWN NUMBER(1)
    FIRE_SINGLE_TREE NUMBER(1)
    FIRE_SUBSURFACE NUMBER(1)
    DAMAGE_FOREST_ID NUMBER(1)
    DAMAGE_SOIL_ID NUMBER(1)
    HEIGHT_DAMAGE NUMBER(4,2)
    F_PROTECTION NUMBER(1)
    F_ECONOMIC NUMBER(1)
    F_RECREATION NUMBER(1)
    CAUSE_ID NUMBER(2)
    OTHER_CAUSE VARCHAR2(200)
    CAUSE_RELIABILITY_ID NUMBER(1)
    ALARM_FORESTDEP DATE
    CHECKED NUMBER(1)
    DATA_FROM_FORESTDEP NUMBER(1)
    DATA_FROM_FIREMANDEP NUMBER(1)
    DATA_FROM_HISTORY NUMBER(1)
    INSERT_DATE DATE
    INSERT_BY VARCHAR2(16)
    UPDATE_DATE DATE
    UPDATE_BY VARCHAR2(16)
    OLD_TI_AFFDFO VARCHAR2(1)
    OLD_TI_S_SPES NUMBER(8,2)
    OLD_TI_PICFOR VARCHAR2(1)
    OLD_TI_FIRE_TYPE VARCHAR2(1)
    OLD_TI_DOMINANT_SPECIES VARCHAR2(1)
    OLD_TI_CAUSE VARCHAR2(2)
    OLD_TI_FOREST_TYPE VARCHAR2(1)
    START_DATE_RELIABILITY_ID NUMBER(1)
    END_DATE_RELIABILITY_ID NUMBER(1)
    DEFINITION_ID NUMBER(1)
    ZONE_ID NOT NULL NUMBER(8)
    79 rows selected
    I'm still interested hoe to use hints. Can anybody tell me?
    Thank you
    Boris

  • 'column ambiguously defined' due to automatic addition of rowid to every JDBC calls

    We are using Weblogic 6.0 spf 1 and Oracle as back end.
    When ever we fire an SQL using JDBC, Weblogic automatically adds 'rowid' to the
    select clause and fires the SQL. If Oralce returns the error 'ORA-00918: column
    ambiguously defined', the rowid is removed and the SQL is run as requested.
    For example, when we say -
    SELECT *
    FROM SOME_TABLE
    Rowid is added blindly and executed query will be
    SELECT rowid, *
    FROM SOME_TABLE
    Oracle throws 'Column Ambigiously defined'. Upon this error weblogic fires originally
    requested query
    SELECT *
    FROM SOME_TABLE
    Another condition where it always fails is in case of SQL joins.
    Is there any way to avoid adding rowid to the SQL statments?
    Thanks
    Satish

    I would appreciate an answer to this same question: "Can the automatic addition of rowid after the select be prevented"? as it is causing several index hints to be rejected.

  • Missing Defines Error in Simple Java Stored Procedure

    Anyone have any suggestions on what might be causing the unusual behavior described below? Could it be a 10g java configuration issue? I am really stuck so I'm open to just about anything. Thanks in advance.
    I am writing a java stored procedure and am getting some SQLException's when executing some basic JDBC code from within the database. I reproduced the problem by writing a very simple java stored procedure which I have included below. The code executes just fine when executed outside of the database (10g). Here is the output from that execution:
    java.class.path=C:\Program Files\jEdit42\jedit.jar
    java.class.version=48.0
    java.home=C:\j2sdk1.4.2_04\jre
    java.vendor=Sun Microsystems Inc.
    java.version=1.4.2_04
    os.arch=x86
    os.name=Windows XP
    os.version=5.1
    In getConnection
    Executing outside of the DB
    Driver Name = Oracle JDBC driver
    Driver Version = 10.1.0.2.0
    column count=1
    column name=TEST
    column type=1
    TEST
    When I execute it on the database by calling the stored procedure I get:
    java.class.path=
    java.class.version=46.0
    java.home=/space/oracle/javavm/
    java.vendor=Oracle Corporation
    java.version=1.4.1
    os.arch=sparc
    os.name=Solaris
    os.version=5.8
    In getConnection
    We are executing inside the database
    Driver Name = Oracle JDBC driver
    Driver Version = 10.1.0.2.0
    column count=1
    column name='TEST'
    column type=1
    MEssage: Missing defines
    Error Code: 17021
    SQL State: null
    java.sql.SQLException: Missing defines
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:158)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
    at oracle.jdbc.driver.OracleResultSetImpl.getString(Native Method)
    at OracleJSPTest.test(OracleJSPTest:70)
    Here is the Java code:
    // JDBC classes
    import java.sql.*;
    import java.util.*;
    //Oracle Extensions to JDBC
    import oracle.jdbc.*;
    import oracle.jdbc.driver.OracleDriver;
    public class OracleJSPTest {
    private static void printProperties(){
         System.out.println("java.class.path="+System.getProperty("java.class.path"));
         System.out.println("java.class.version="+System.getProperty("java.class.version"));
         System.out.println("java.home="+System.getProperty("java.home"));
         System.out.println("java.vendor="+System.getProperty("java.vendor"));
         System.out.println("java.version="+System.getProperty("java.version"));
         System.out.println("os.arch="+System.getProperty("os.arch"));
         System.out.println("os.name="+System.getProperty("os.name"));
         System.out.println("os.version="+System.getProperty("os.version"));
    private static Connection getConnection() throws SQLException {
         System.out.println("In getConnection");      
    Connection connection = null;
    // Get a Default Database Connection using Server Side JDBC Driver.
    // Note : This class will be loaded on the Database Server and hence use a
    // Server Side JDBC Driver to get default Connection to Database
    if(System.getProperty("oracle.jserver.version") != null){
              System.out.println("We are executing inside the database");
              //connection = DriverManager.getConnection("jdbc:default:connection:");                    
              connection = new OracleDriver().defaultConnection();
    }else{
         System.out.println("Executing outside of the DB");
         DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
         connection = DriverManager.getConnection("jdbc:oracle:thin:@XXX.XXX.XXX.XX:XXXX:XXXX","username","password");
    DatabaseMetaData dbmeta = connection.getMetaData();
    System.out.println("Driver Name = "+ dbmeta.getDriverName());
    System.out.println("Driver Version = "+ dbmeta.getDriverVersion());
    return connection;
    public static void main(String args[]){     
         test();     
    public static void test() {   
         printProperties();
    Connection connection = null; // Database connection object
    try {
         connection = getConnection();
         String sql = "select 'TEST' from dual";
         Statement stmt = connection.createStatement();
    ResultSet rs = stmt.executeQuery(sql);     
         ResultSetMetaData meta = rs.getMetaData();     
         System.out.println("column count="+meta.getColumnCount());
         System.out.println("column name="+meta.getColumnName(1));
         System.out.println("column type="+meta.getColumnType(1));
         if(rs.next()){
              System.out.println(rs.getString(1));
    } catch (SQLException ex) { // Trap SQL Errors
         System.out.println("MEssage: " + ex.getMessage());
         System.out.println("Error Code: " + ex.getErrorCode());
         System.out.println("SQL State: " + ex.getSQLState());
         ex.printStackTrace();
    } finally {
    try{
    if (connection != null || !connection.isClosed())
    connection.close(); // Close the database connection
    } catch(SQLException ex){
    ex.printStackTrace();
    Message was edited by:
    jason_mac

    Jason,
    Works for me on Oracle 10.1.0.3 running on Red Hat Enterprise Linux AS release 3 (Taroon).
    Java code:
    import java.sql.*;
    * Oracle Java Virtual Machine (OJVM) test class.
    public class OjvmTest {
      public static void test() throws SQLException {
        Connection conn = DriverManager.getConnection("jdbc:default:connection:");
        PreparedStatement ps = null;
        ResultSet rs = null;
        try {
          ps = conn.prepareStatement("select 'TEST' from SYS.DUAL");
          rs = ps.executeQuery();
          if (rs.next()) {
            System.out.println(rs.getString(1));
        finally {
          if (rs != null) {
            try {
              rs.close();
            catch (SQLException sqlEx) {
              System.err.println("Error ignored. Failed to close result set.");
          if (ps != null) {
            try {
              ps.close();
            catch (SQLException sqlEx) {
              System.err.println("Error ignored. Failed to close statement.");
    }And my PL/SQL wrapper:
    create or replace procedure P_J_TEST as language java
    name 'OjvmTest.test()';And here is how I execute it in a SQL*Plus session:
    set serveroutput on
    exec dbms_java.set_output(2000)
    exec p_j_testGood Luck,
    Avi.

  • Run-time error '1004' Application-Defined or object-defined error

    Hello friends,
    My requirement is to make the cells under Columns Actual, forecast and target (Dimesnion Category) Locked.
    I've used various methods like GetOnlyRange but it didnt work.
    Now, i've selected all the cells of the sheet, where user can input and made them unlocked. ( from Right-click>FormatCells>Protection tab-->Locked checkbox unchecked)
    Then, go to "review" tab, click "Allow Users to edit Ranges",-> Protect Sheet---> ticked "Unlocked Cells"
    Then go to WorkBook Options and set a password for the worksheet.
    But on expand, I'm facing Run-time error '1004' Application-Defined or object-defined error.
    Please help.
    Please help.

    Hi,
    I think that  is VBA Runtime error, you can fix these errors by downloading in various sites.
    http://www.articlesbase.com/data-recovery-articles/vba-runtime-error-1004-application-defined-or-object-defined-error-fix-these-errors--1339060.html
    You can try with the above link.  I hope this could solve your problem.
    Regards,
    B.S.RAGHU

  • Sorting on time column is giving error in 3.1 endeca

    Hi All,
    When I am doing sorting on event time column I am getting below error:
    An error occurred while executing query: exception encountered while executing external function 'internal:navigation-query', caused by error endeca-err:MDEX0001 : Invalid input : Error in EQL Query: - In statement "_$Records_1385576435829": In ORDER BY clause: ORDER BY clauses may refer only to attributes defined in the same statement; "EVENT_TIMEYEAR" is not
    I am not sure what this error is.What should be done to remove this or should I remove sorting on this column?
    Thanks,
    Amrit

    Amrit, it is possibly the changed treamment of ARB.
    What kind of error are you getting for those columns that are erroring?
    Please see this topic from the Endeca Server 7.6.x Migration Guide which highlights the differences in EQL (Endeca Query Language), that took place in this release:
    http://docs.oracle.com/cd/E40521_01/server.760/es_migration/toc.htm#Endeca%20Query%20Language%20changes
    You will see the following: (quoting from the linked documentation):
    For EQL 7.6.x, the ARB,COUNT, andCOUNTDISTINCT functions have been updated to work with multi-assign attributes.You will also see that "In 7.6, an implicit ARB is no longer added. That is, a SELECT of non-aggregate attributes is no longer allowed".
    Also, see the following doc, about the ARB function: http://docs.oracle.com/cd/E40521_01/server.760/es_eql/toc.htm#ARB
    In this doc, it is stated:
    ARB works as follows:
    For a single-assign attribute,ARBfirst discards all NULL values and then selects an arbitrary but consistent value from the remaining non-NULL values. If the attribute has no non-NULL values, then NULL is returned.
    For a multi-assign attribute,ARBlooks at all of the rows in the group (including those with empty sets) and selects the set value from one of the rows. In other words, empty sets and non-empty sets are treated equally. This means that because the selection is arbitrary, the returned set value could be an empty set. TheARBreturn type is the same as its argument type: if attribute x is anmdex:long-set, then so is ARB(x). If the attribute has no non-NULL values, then the empty set is returned.

  • ORA-00918: column ambiguously defined : while using inner Select

    Hi
    could you please help me to solve the following from.
    I have a query like this
    SELECT * FROM (SELECT ZMV.VENDOR_NAME,FR.PO_NUM,ZMV.PART_NUMBER,FR.ZAC_ITEM_DESCRIPTION,ZMV.QUANTITY_ORDERED,FR.QUANTITY_RECEIVED,ZMV.PO_UOM_CODE,FR.VENDOR_INV,FR.FORWARDER_REF,FR.PCS,TY.DESCRIPTION,FR.GROSS_WGT,FR.NET_WGT,FR.CFT,TR.DESCRIPTION,FR.PRO,FR.FORWARDER_REMARK,FR.RECAP_ID,FR.ZAC_REMARK,FR.SHIPMENT_BY FROM FWD_RECAP FR,ZAC_METRO_VIEW ZMV,FWD_MASTER_TYPE TY,FWD_MASTER_TRUCK TR WHERE FR.TYPE_ID=TY.TYPE_ID AND FR.TRUCK_ID=TR.TRUCK_ID AND FR.PO_LINE_ID=ZMV.PO_LINE_ID AND FR.PACKAGE_ID=0 AND FR.OPERATIONING_UINT_ID=511 AND FR.FORWARDER='METRO,ITALY' ORDER BY FR.PO_LINE_ID DESC) WHERE ROWNUM <=10
    But while executing the following error showing,
    SELECT * FROM (SELECT ZMV.VENDOR_NAME,FR.PO_NUM,ZMV.PART_NUMBER,FR.ZAC_ITEM_DESCRIPTION,ZMV.QUANTIT
    ERROR at line 1:
    ORA-00918: column ambiguously defined
    For this problem i got some answers from web sites, they saying as follows, but i am using like that only.
    (ORA-00918: COLUMN AMBIGUOUSLY DEFINED)
    Use table aliases and prefix all column names by their aliases when more than one table is involved in a query. This reduces parse time AND prevents future syntax errors if someone adds a column to one of the tables with the same name as a column in another table.
    awaiting your immediate reply
    Thankyou
    Jobin [[email protected]]

    In your inline view you have fields
    TY.DESCRIPTION and TR.DESCRIPTION which are the same
    name DESCRIPTION for covered SQL.
    place TY.DESCRIPTION TY_DESCRIPTION and
    TR.DESCRIPTION TR_DESCRIPTION in your code:
    SELECT * FROM (SELECT ZMV.VENDOR_NAME,FR.PO_NUM,ZMV.PART_NUMBER,FR.ZAC_ITEM_DESCRIPTION,ZMV.QUANTITY_ORDERED,FR.QUANTITY_RECEIVED,ZMV.PO_UOM_CODE,FR.VENDOR_INV,FR.FORWARDER_REF,FR.PCS,TY.DESCRIPTION TY_DESCRIPTION ,FR.GROSS_WGT,FR.NET_WGT,FR.CFT,TR.DESCRIPTION TR_DESCRIPTION,FR.PRO,FR.FORWARDER_REMARK,FR.RECAP_ID,FR.ZAC_REMARK,FR.SHIPMENT_BY FROM FWD_RECAP FR,ZAC_METRO_VIEW ZMV,FWD_MASTER_TYPE TY,FWD_MASTER_TRUCK TR WHERE FR.TYPE_ID=TY.TYPE_ID AND FR.TRUCK_ID=TR.TRUCK_ID AND FR.PO_LINE_ID=ZMV.PO_LINE_ID AND FR.PACKAGE_ID=0 AND FR.OPERATIONING_UINT_ID=511 AND FR.FORWARDER='METRO,ITALY' ORDER BY FR.PO_LINE_ID DESC) WHERE ROWNUM <=10
    Rgds

  • Version Change from 10.2.0.3.0 to 11.2.0.4.0 - Column ambiguously defined

    Hi,
    Our oracle version has been upgraded from 10g to 11g.
    After upgrade we face serious problem in compiling several packages, procedures and views and that throws an error "Column Ambiguously Defined", which was running perfectly in 10g version.
    I have come through several blogs like, this problem occurs for many ppl as part of upgrade from 10g to 11g and the only solution is to change the code.
    But in our case we have many numbers of objects like procedures, packages and views where this error occurs, do we have any common solution for overcome this problem (without changing the code)?
    Regards,
    Ananth

    e7a47215-0e59-4d88-a082-7ad5e83ce5b0 wrote:
    Hi,
    Our oracle version has been upgraded from 10g to 11g.
    After upgrade we face serious problem in compiling several packages, procedures and views and that throws an error "Column Ambiguously Defined", which was running perfectly in 10g version.
    I have come through several blogs like, this problem occurs for many ppl as part of upgrade from 10g to 11g and the only solution is to change the code.
    But in our case we have many numbers of objects like procedures, packages and views where this error occurs, do we have any common solution for overcome this problem (without changing the code)?
    Regards,
    Ananth
    You will need to bite the bullet & change the code

  • How do you use user defined error messages in Value Help?

    Hi,
    I'm currently working on a Modifiable Value Help Selector in Web Dynpro Java, and I want to use a user defined error message when I validate the values entered by a user. Currently, it's returning its default error message ("Character <string> does not match...").
    Since the project requires a different error message, is there a way to override the default error message and use my defined error message instead?
    Thanks!

    Hi Angelo,
    I am not sure why message area is showing both Custom and inbuilt messages but you can try the following:
    i guess you must be using reportContextAttribute exception for showing Error messages on the input fields as well.in that case you can disable the message area so messages will appear only on the Context level ie; on input fields.
    For other messages apart from validation messages you can enable the message area before reporting the exception.
    make sure the boolean context variable which will be used for enabling and disabling the message area should have Readonly property set as true.
    I am not sure whether this is the only solution for this but you can try and see if it works.
    Siddharth

Maybe you are looking for

  • Reading XML file using BAPI and then uploading that xml file data into SAP

    I am getting a xml file from Java server. I need to take data from this file using BAPI and need to upload into SAP using SAP. Please tell me how to read XML files using BAPI's.

  • Jerky playback in Bridge CS4

    I get jerky playback of Hi Def mov files shot on my Canon 7D when playing them back through Bridge. The same movies play smoothly with no stuttering whatever on the same machine through Nero or any other player I have installed. According to my camer

  • How do I create an on the go playlist on my touch screen nano

    I don't have a computer at the moment and would like to create an on the go playlist. On my old nano I could do this by pressing the centre button. On my new nano touch screen I just can't seem to do it! Any help please.

  • Missing fonts when opening iWeb.

    When reopening iWeb after making a website succesfully the day before, all my 'fun' kind of fonts that came with my iMac (like Handwriting-Dakota; PortagolTCTT, etc.) are missing. I haven't deleted anything and don't understand how that's possible. D

  • Error #1095 and Error #1090

    I am using Flash player 14.0.0.125 with IE 8. I am constantly getting Error #1095 and Error #1090 when access any report that require flash to load. My co-worker's system has the same build as mine and she is not these messages. Has anyone experience