Join the same view using 2 different conditions, getting error ORA-00918

Hi, I am trying to do a full outer join using the same view with different where conditions. Sample code below. I am getting the error "ORA-00918: column ambiguously defined". I have used as much alias as I can on the select statements but it gives me the same error.
The weird thing is, RIGHT OUTER JOIN and LEFT OUTER JOIN will work fine. Only FULL OUTER gives the error above.
Thanks in advance for your help.
SELECT firsttable.<column_name>, secondtable.<columnname>
FROM
SELECT ...
FROM V_MYVIEW
WHERE <column_name> IN (1,2)
) firsttable
FULL OUTER JOIN
SELECT ...
FROM V_MYVIEW
WHERE <column_name> IN (3,4)
) secondtable
ON firsttable.<column_name> and secondtable.<column_name>

ON firsttable.<column_name> and secondtable.<column_name> ON firsttable.<column_name> = secondtable.<column_name>

Similar Messages

  • How can all of the same subscriber in different instance get the meesages?

    Hi
    I am using MDB to recieve messages from publisher, used for event and notification, I deploy same MDB into different instance, if there is a event, the publisher will publish a message, and all subscribers in different instance are supposed to get the message, but reffer to the message flow, only one of these MDB will recieve the messages.
    One solution is to have different clientID for these MDB in different instances. But unfortunately, the value for clientId should be constant expression.
    Here is my code, any suggestion?
    @MessageDriven(mappedName = "cluster_publisher_adm", activationConfig = {
         @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
         @ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "Durable"),
         @ActivationConfigProperty(propertyName = "clientId", propertyValue = "test"),
            @ActivationConfigProperty(propertyName = "subscriptionName", propertyValue = "myTest"),
         @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic") })
    public class TopicListener implements MessageListener {
        public TopicListener() {
        }How can I have all the MDB in different instances to get the same messages?

    I presume you are using Glassfish and Glassfish Message Queue, and that your Glassfish instances are clustered. If so, then if an MDB (listening on a topic) is deployed into the cluster, each message will indeed be delivered to one MDB per cluster rather then to one MDB per instance. This is a feature known as "shared subscriptions".
    If you are using Glassfish 2.1.1 or 3 (but not earlier versions) you can disable this using an activation spec property. Take a look at the latest documentation at
    http://docs.sun.com/app/docs/doc/821-0027/aeooq?l=en&a=view&q=activationspec
    and scroll down to the new property "useSharedSubscriptionInClusteredContainer". You need to set this to false.
    Nigel

  • Using DBMS_METADATA.GET_DDL get error: ORA-00907: missing right parenthesis

    Hi,
    I'm trying to extract schema DDL from a database (10.2.0.4.0 - 64bit Enterprise Edition on Solaris 10). I run the query below and get an ORA-00907: missing right parenthesis error.
    SELECT DBMS_METADATA.GET_DDL( REPLACE(object_type,' ','_') AS object_type, object_name) FROM user_objects WHERE object_type NOT IN ('TABLE_PARTITION','INDEX_PARTITION','LOB');
    This is the output when running the above in sqlplus worksheet
    select DBMS_METADATA.GET_DDL( REPLACE(object_type,' ','_') as object_type, object_name) FROM user_objects where object_type not in ('TABLE_PARTITION','INDEX_PARTITION','LOB')
    ERROR at line 1:
    ORA-00907: missing right parenthesis
    removing the where clause gives the following:
    select DBMS_METADATA.GET_DDL( REPLACE(object_type,' ','_') as object_type, object_name) FROM user_objects
    ERROR at line 1:
    ORA-00907: missing right parenthesis
    Any pointers would be gratefully received. I know I could get the DDL out using exp/imp but I want to understand why I'm getting the missing parenthesis error.
    cheers,
    Ewan

    SELECT DBMS_METADATA.GET_DDL( REPLACE(object_type,' ','_') AS object_type, object_name) FROM user_objects WHERE object_type NOT IN You don't need an alias here. Get rid of " AS object_type" and it should work.

  • In a Multiconsumer queue when I use listen() I get error ORA-00600

    I created a queue table
    SYS.DBMS_AQADM.CREATE_QUEUE_TABLE
    QUEUE_TABLE => 'TEST_QUEUE_TAB'
    ,QUEUE_PAYLOAD_TYPE => 'TEST_TYPE'
    ,COMPATIBLE => '8.1'
    ,SORT_LIST => 'ENQ_TIME'
    ,*MULTIPLE_CONSUMERS => TRUE*
    ,MESSAGE_GROUPING => 0
    End;
    This is my C# code that I am using to dequeue message synchronously in a mutli consumer queue using ODP. I am getting Oracle exception ORA-00600 in the OracleAQQueue.Listen() method. Any help I would greatly appreciate it.
    try
    string connString = "Data Source=XXX;User Id=XXX; Password=XXX";
    OracleConnection connObj = new OracleConnection(connString);
    connObj.Open();
    //create a new queue object
    OracleAQQueue queueObj = new OracleAQQueue("TEST_QUEUE", connObj);
    queueObj.MessageType = OracleAQMessageType.Udt;
    queueObj.UdtTypeName = "TEST_TYPE";
    queueObj.NotificationConsumers = new string[1] { "OPTEST" };
    queueObj.DequeueOptions.Visibility = OracleAQVisibilityMode.OnCommit;
    queueObj.DequeueOptions.ConsumerName = "OPTEST";
    queueObj.NotificationConsumers = new string[]{ "OPTEST" };
    queueObj.DequeueOptions.Wait = 100;
    string[] listenConsumers = new string[1] { "OPTEST" };
    queueObj.Listen(listenConsumers);
    catch(Exception ex)
    MessageBox.Show(ex.ToString());
    }

    ORA-00600, by definition, is an unhandled error in the Oracle database's internal code.
    Open a Support Request (SR) with Oracle or, if you do not have access, have your DBA or a senior developer do it for you.
    It is Oracle's responsibility to fix this ... not yours.

  • Insertin Data useing SQL Procedure Getting Error ORA-00942 and ORA-06512

    I have two Schemas ISYS and ISYSTWO
    I had created a Stored Procedure RECINC2 in Schema ISYS
    as
    procedure recinc2(cName IN CHAR,cWhere IN CHAR,cTable in CHAR)
    AS
    cQry VARCHAR2(1000);
    BEGIN
    cQry := 'INSERT INTO '||cName||'.'||cTable||' SELECT * FROM '||cTable|| ' WHERE ||cWhere;
    dbms_output.put_line(cqry);
    EXECUTE IMMEDIATE cQry;
    end;
    NOW WHEN in Run it gives error
    SQL> begin
    2 recinc2('ISYSTWO','CODE=4','AGENTS');
    3 end;
    4 /
    INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
    begin
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "ISYS.RECINC2", line 8
    ORA-06512: at line 2
    BUT IF I EXECUTE
    the DBMS output
    INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
    it executes and gives fine result
    Please help
    Thanks
    Chaand kackria

    SQL> conn ISYSTWO/ISYSTWO
    Connected.
    SQL> grant all on agents to isys;
    Grant succeeded.
    SQL> conn isys/isys
    Connected.
    SQL> exec recinc2('ISYSTWO','CODE=4','AGENTS');
    INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
    PL/SQL procedure successfully completed.

  • I was login a website ,and i have opened cookies , i want to open another window to login the same website use another account , and in the same windows can use the same account , how can i achieve it ? thinks

    i want to use firefox to login a website ,in the same window and different tags can user the same session
    but when i open other window and login the same website use different account .
    how can i achieve it ? thinks

    Your problem has nothing to do with the faults or limitations of a web browser.
    ''There can be only ONE active user logged in on a specific website during a whole Browsing Session. Even if you try to log-in using a new window it will sign-out the earlier User ID from that website. It will keep the most recent logged-in User ID active.''
    This is the general policy on which all websites are built. Even if you try to login the same website from another web browser, you won't be able to login from the second platform either. I just check it. Tried on Mozilla and Internet Explorer.

  • How can I use the "Copy and paste" tool in order get stamps in the same position in different pages (Acrobat XI for PC)?

    With Acrobat 6.0 I was able to copy a stamp in the same position (I mean "exactly" the same one) of different pages just by using the "copy/past" tool.
    Now I am using Acrobat XI and it seems like it is not possible anymore: I am copying a stamp and I am trying to past it in anoter page, but it appears in the center of the page (or wherever it wants to...).
    Does anyone have a solution?
    Thanks in advance.

    Thank you very much. I'll be waiting for you message.
    Messaggio originale----
    Da: [email protected]
    Data: 26/01/2015 17.56
    A: "Umberto Gangi"<[email protected]>
    Ogg:  How can I use the "Copy and paste" tool in order get stamps in the same position in different pages (Acrobat XI for PC)?
        How can I use the "Copy and paste" tool in order get stamps in the same position in different pages (Acrobat XI for PC)?
        created by Gilad D (try67) in Creating, Editing &amp; Exporting PDFs - View the full discussion
    Well, I was in the same situation so I've developed a tool that allows one to do it. I will send you some additional information about it in a private message.
         If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7132586#7132586 and clicking ‘Correct’ below the answer
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7132586#7132586
         To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, &amp; "Stop Following"
         Start a new discussion in Creating, Editing &amp; Exporting PDFs by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • Reading Attributes from different context nodes in the same view

    Hi,
    I have added a new field as part of an enhancement for Trade Promotions. This field is a checkbox and part of the context node TRADE in the view TPMOE/HeaderEOF. This field will be checked or unchecked using a logic in the background.
    The logic will be based on an attribute (Fund Plan ID) which is part of another context node FUNDPLAN in the same view.
    How can I read the attribute of FUNDPLAN context node in TRADE context node?
    A sample code will be quite helpful as I am new to CRM 2007.
    Thanks,
    Abhishek
    Edited by: Abhishek  Periwal on Oct 16, 2008 2:35 PM

    Hi Abhishek,
    If I understand your question correctly, you would like to access the Fund plan ID (in a different context node) in the getter setter methods of the check box attribute which you have added.
    The code snippet mentioend by sudeep works perfectly fine when you are making any checks in the view implementation class. But since you are in the getter setter methods of the context class, this doesnot work as "me" always refers to the class instance in which you are present.
    Now in this case what you need to do is :
    1)  create an attribute <view_controller> in your context class. Here the context is TRADE. The type of this attribute wud be same as the view controller class CL_TPMOE_HEADEREOF0_IMPL
    2) Go to the view controller class and redefine the method
    DO_VIEW_INIT_ON_ACTIVATION. This method is called only once when the view is loaded for the first time.
    3) In this method, put the following code
    me->typed_context->(Trade)->[view_controller] = me.
    by the above code, you are setting the newly created attribute to the view controller instance.
    4) The next step would be, go back to your getter setter methods or what ever it may be, try referring to the Fund plan ID by the code snippet mentioned below
    data: lr_entity type ref to cl_crm_bol_entity.
    lr_entity ?= me->[view_controller]->typed_context->[the context node in which the fund plan id is present]->get_current().
    lv_field_value = lr_entity->get_property_as_String( **pass the field name here ).
    This should definitely resolve the problem.
    Thanks,
    Vinay

  • How to use the same component in different applications

    Hi All,
    I need to use the same component in different applications. i.e In opportunity, Quotation & Promotion.
    The Search help view in the component PRD01QR should be used in all these components but with different search criteria.
    With help of the DO_determine_configuration, different view configurations are possible but Different search criteria is not possible.
    for Eg. search parameter without DDLB, F4 options in another components.
    How can I control the behavior of the search view in different applications with restricting the field properties?
    Is it possible to find out where and in which component these search_help_search component is used?

    Hi Harry,
    Is it possible to find out where and in which component these search_help_search component is used?
    ans: I am giving an Example for your question go through that u might get clear about this.
    Ex: BT115IT_SLSO  sales order component
    below screen they component usage using for populate the product search component.
    please let me know any help required .
    Regards,
    vishwa.

  • HT2905 I have multiple album titles of the same name with different artists. How can I get them to go under one album title again?

    I have multiple album titles of the same name with different artists. How can I get them to go under one album title again?

    In iTunes(on a Mac or PC) just tap on 'Albums' rather than 'Artists' and you'll see them all together.
    You may find that there are songs mislabelled. In which case right tap on the Album or Artist and tap 'Get Info', then change to the correct name and the songs will join the rest of the songs for that Artist or Album.
    Then resync with your iPhone and all will be well.

  • Why can't two different users use Itunes on the same computer with different log ins

    Why can't two different users use Itunes on the same computer with different log ins

    Pmorgan5672 wrote:
    Why can't two different users use Itunes on the same computer with different log ins
    They can, but not at the same time.
    If one user left iTunes running, and another user tries to use iTunes from a different Windows user ID, that second user will get an error message.  If they really want to use iTunes, they either have to beg the first user to log in and close iTunes, or else they have to restart the computer.
    If you are asking the technical reason why, it is something about context switching.

  • Can several members of a household use the same library with different log ins

    Once you have downloaded the latest version of iTunes to a computer, can different members of the same family use the same library but with different log ins or do you need different computers?

    exactly:) you first gotta transfer the apps from your devices by connecting them and going to file and "transfer purchases" and it should bring the apps over
    PS: do make sure that the computer is authorized for all of the purchases do this
    -go to store at the very top of the page (usually up there with file,edit,view,and controls)
    -choose authorize this computer
    -enter the email address and password associated with the purchases you are transferring and hit authorize!!
    -quick transfer and done, you guys can share whatver you transfer to the library
    hope this helps:)

  • I downloaded pages from the app store and I can use it on my Mac login but it doesn't show up when my wife logs in to her account? Were using the same computer, just different logins.

    I downloaded pages from the app store and I can use it on my Mac login but it doesn't show up when my wife logs in to her account? Were using the same computer, just different logins.

    No. You need to buy it for your Apple ID and for the other. You will have problems with updates

  • I have used the same Apple ID on my children's iPads. Both iPads are now showing as the same. How do I get the missing account back?

    I have used the same Apple ID on my children's iPads. Both iPads are now showing as the same. How do I get the missing account back?

    You can clear the iPad and start again with the other account> Settings->General->Reset->Erase all Content & Settings
    Or you can go to Settings->Itunes and App Stores->Apple ID->Sign Out,
    And Then  Sign in with the other account. You can then download the Apps with that account. Though you may block the other account for 90 days.
    Your best bet is to set it up again using the orighinal account it had, so you can get their Apps back. without affecting your account.

  • How to use the same element in different photoshop files?

    It occurs to me often that I use the same element in different photoshop files, a header or footer shown in the example below. So when the footer changes in one document, I need to change this footer in every other single document.
    Is there a possibility to use some kind of template, one single document,  that can be placed in different files , which is still editable afterwards?
    Thanks in advance.
    I'm using Photoshop CS6

    In a single document you can have several pages and these pages may have headers and footers that share smart objects.  If you replace the contents of the an embedded smart object on one page page that is shared on an other page the pages you will see both pages contents are changed. For they share the common object.   It is also possibly to have independent smart object layers. It depends how you create the layers in the single document.
    Example one sharing a smart object hi-light a smart object layer and use menu layer>Duplicate Layer... This will create a second smart object layer that share a common smart object. Each layer has is own associated transform. Do it again and you will have three layers the share a common smart object. So you can use each layer associated transform to position and size the layers contents. Make a picture package for example. When you hi-light any of the three smart layers and you use menu Layer>Smart Objects>Replace Contents... all three layers contents will be replace with the new smart object.  Care must be taken to replace the smart object with an identical size object for only the object is replaced the three associated transform for the three layers are not replaced or changed.
    Example two independent smart objects  hi-light a smart object layer and use menu layer>Smart Objects>New Smart Object via Copy.  This will  create a second smart object layer that has it own embedded smart object copy.  Do it again and you will have three all have independent embedded smart object that are identical.  However they do not have to remain identical.  For example if the first smart object layer was created by using ACR to open a RAW file as a smart object layer the embedded object is a copy of the raw file and its associated RAW conversion settings.  Double clicking on one of the smart object layers and you will see ACR open on its embedded RAW file with the embedded RAW conversion setting.  Changing these settings will update the layer smart object content with new ACR setting and pixel when you click OK in ACR. Repeat for the third and you will find you have three different raw conversions in Photoshop you can mask and blend together to bring out detail.
    I think what your missing is that a smart object contains a copy of the original object.  Changing the original after creating a smart object layer in document will not effect the smart object layer at all. Its independant from the original having a copy of the original. Only changes to the smart object layer and its embedded smart object effect smart object layers.

Maybe you are looking for