How to specify more than Two Tables in NATURAL JOIN

Hi,
I am using Oracle9i R-2. I want help in writing a Query using Two Tables in SQL*PLUS. I am using ANSI/ISO Standrard for table-joins:
select col1, col2, descr
from tab1 natural join tab2
There are two columns col1 & col2 is common between thse two tables. So, it will join them and query execute well.
How can i use 3rd table tab3 in the same way in Natural Join...? If column col1 & col2 is available in tab3 also.
I tried this way, but it gives me error:
select col1, col2
from tab1 natural join tab2 natural join tab3
Is it possible to specify more than two tables in Natural Join Clause.
Please check that out & help please. Thanks.
Regards,
Kamesh Rastogi

I do not get an error when I try the same thing on the same version, as demonstrated below. Can you post your table structure and a copy and paste of a run of your actual query with the error that you are receiving?
scott@ORA92> select banner from v$version
  2  /
BANNER
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
PL/SQL Release 9.2.0.1.0 - Production
CORE     9.2.0.1.0     Production
TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
NLSRTL Version 9.2.0.1.0 - Production
scott@ORA92> select * from tab1
  2  /
      COL1       COL2 COL3
         1          1 A
        10         10 B
scott@ORA92> select * from tab2
  2  /
      COL1       COL2 COL4
         1          1 C
        20         20 D
scott@ORA92> select * from tab3
  2  /
      COL1       COL2 COL5
         1          1 E
        30         30 F
scott@ORA92> select col1, col2, col3, col4, col5
  2  from tab1 natural join tab2 natural join tab3
  3  /
      COL1       COL2 COL3 COL4 COL5
         1          1 A    C    E
scott@ORA92>

Similar Messages

  • How can I download to one excel sheet from more than two table?

    Hi.
    as you know
    <SAP_BW_URL CMD='EXPORT' FORMAT='XLS' DATA_PROVIDER='DATAPROVIDER_T1' >
    this script can make download excel sheet which is same cotents of table or chart in web template.
    but if template has more than two tables how can we get excel sheet from tables?
    <SAP_BW_URL CMD='EXPORT' FORMAT='XLS' DATA_PROVIDER_1='DATAPROVIDER_T1' DATA_PROVIDER_2='DATAPROVIDER_T2'>
    I hope this gonna work but result was fail same as I expected.
    is there any way put two tables download one excel sheet?

    Welcome to SDN.
    Post this in Business Explorer forum for quicker resposne.
    SAP Business Explorer (SAP BEx)
    Regards
    Raja

  • Retrieval of Data from More Than Two tables

    Hi Experts,
    How to get the data from more than two tables.
    By using Jdbc, and through only core java.
    I mean if i entered some empid at command prompt,
    then the complete data (where empid is presented at some tables like L1,L2,L3,L4.) is to be displayed.
    Bye
    TulsiRam Mohan.
         Message #196971

    Is creating view on these 4 tables is an option ?
    Something like :
    Select * from a
    union all
    select * from b
    ... and so on ?

  • How to specify more than 6 parameters in the URL or in the HTTP header?

    After applying SAP note 1105368 ,it will be availible to specify more than 6 parameters in the URL  header.
    But i haven't figured out  how to specify it yet.even though i went through the note carefully, but it really hard to understand.
    Is there someone who experienced to specify more than 6 parameters ?
    Inccording to the note,the parameter fileds look like should be
    specified like below.
    parameter1: <SAP:Record namespace="http://sap.com/xi/XI/System/HTTP" name="SAP_URL_EXTENSION">urlext</SAP:Record>
    parameter2:<SAP:Record namespace="http://sap.com/xi/XI/System/HTTP" name="urlext01">Order=4711</SAP:Record>
    parameter3:<SAP:Record namespace="http://sap.com/xi/XI/System/HTTP" name="urlext02">Object=1807</SAP:Record>
    but something about the format doesn't look right....

    Hi,
    I know we can set headers by using some tools. Neoload tool is used to set values into header.
    If Servlet after receiving the request you can set header values and send back with response.
    Check this
    http://www.unix.com.ua/orelly/java-ent/servlet/ch05_06.htm
    Thanks,
    RamuV

  • More than two tables in crystal report.

    Was wondering if anyone new of a patch for reports with more than 2 tables. This does not seem to work when there are more than 2 tables in a report...it worked in 7.3.

    22222
    null

  • How to allow more than two users on remote desktop on windows server 2012 foundation?

    i have a dell server power edge T300 with windows server 2012 foundation. I am unable to connect more than two remote desktop at once.

    Hi,
    Add to Brain, you cannot have more than 15 user accounts in Windows Server 2012 Foundation.
    In order to access a hosted application, such as Microsoft® Office, a license for Windows Server 2012 Remote Desktop Services is required for each user account (not to exceed 15 user
    accounts) that directly or indirectly uses RD Gateway to host a graphical user interface, including using Remote Desktop Connection (RDC) client. When using Remote Desktop Services, you may not install or use Remote Desktop Connection Broker or Remote
    Desktop Virtualization Host role services. For more information about Remote Desktop CALs , see http://go.microsoft.com/fwlink/?LinkId=140238.
    http://technet.microsoft.com/en-us/library/jj679892.aspx
    Hope this helps.
    Jeremy Wu
    TechNet Community Support

  • How to manage a Database Application with more than two tables

    Hello All,
    I need to manage (reconciliation and provisioning) a database application where user attributes are strored in seven tables.
    Reference guide for Database Applications Table connector says that only two tables can be managed using this connector.
    Which is the best way to solve this problem? Could I create a view in my database ? are database views supported? Must I create a new conector?
    Thanks in advance.

    Hi ,
    I developed it from scratch due to complex requirements for accessing tables and their relationship. You can use current connector for your reference.at higher level you need to do only two change (1) build query from xml files to add,update,delete* record across seven tables - (2) changing oim elememnt ( use connector guide for changing element to match your needs)
    To develop new connector :
    (1) study relationship between these tables (1:*) and fields of interest and also ,as earlier mentioned timestamps for fetching changed record. based on your requirement.
    (2) create OIM elements , something you have when you deployed DB app. connector. modify it for requirement. i.e fields .. trusted , non trusted. process task,adapter
    (3) Develop classes to get execute query on database. create adapters to perform add/update/delete operation on 7 tables.

  • Left Outer Join with more than two tables in both CR 8.5 and XIR2

    I am trying to create a report and I have tried two versions of Crystal but I ultimately need the report in CR8.5 for compatibility with the client's system.  I think I am starting to figure out what might be wrong and it might be my understanding of SQL, but I can't see why someone hasn't needed this in the past. Ultimately I want to see all projects and any journal entry that might be posted for that project.
    Database is MySQL 5.0.38 and using MySQL ODBC driver 3.51.19.
    Project header table information will be populated. Each line item on a journal entry can be tagged with the project ID. But for me to pull the journal entry date I need also to link to a third table for the journal entry header info.
    I want to see all projects, whether a journal entry has been posted or not.
    So the links are like this
    ProjectHeader --->Left Outer Join ---> JELines ---> Inner Join ---> JEHeader
    I think in this scenerio Crystal is treating the LOJ as an IJ.
    I created two brand new reports today, one in CR8.5 and one in CR XIR2. Once I edited the automatic CR8.5 SQL statement (which I have been doing for years, usually without problem), they both ran properly. I linked customers to their invoices. Customers without invoices showed properly. But then I linked the invoices to the payments of the invoices and immediately lost customers without orders in both reports.
    So apparently only two tables are allowed in Outer Joins. Does this make sense?  I checked out the w3schools tutorial on SQL and it doesn't mention this limitation and I can't find anywhere else that it specifically indicates this but all samples of code I have seen only show two tables.  I just thought for presentation as a sample that was easiest to understand and we could expand as necessary.
    If this is correct, how does one go about accounting for this kind of thing?  One solution that goes through my mind is creating a view at the database level for the link between journal entry lines and journal entry headers.  Would this be a good solution under normal circumstances?
    A second option that I had to implement because of timelines, is to use a subreport linked to the main report through the project ID to pull the information for the journal entries and just pass the totals I need to the main report through a shared variable.
    These aren't normal circumstances because I don't have access to the database so I can't create the view.  I have come across this concept several times and I have been able to use subreports to solve it but I am trying to find a better solution for the future as sometimes subreports can be slow.  So are there any alternatives I have not considered here?
    TIA rasinc

    So after some more work and another post.  I was able to get this to work.
    Items disappear when linking to another table
    My issues were two fold.  I was selecting on the tables on the right-side of the original Inner Join.  However, I was checking for Nulls.  This apparently is correct but you must check for the Nulls first eg. (IsNull (JEHeader.Field1) OR JEHeader.Field1 <= 100).  I had my original statement reversed checking for <= 100 before checking for Nulls.
    I also did not set all links to be Left Outer Join.  I had the Inner Join.  I actually have about 6 tables in this report so all the links need to be set Outer Join.  So this now seems to be corrected.
    Thanks

  • How to update more than one table using EO

    Hi frnds,
    Can someone provide me a doc/link which explain in detail how we can we update more than one PL/SQL tables using entity objects(on which VOs are based).
    Till date I have been doing this using PL/SQL procedures but now my requirement is to achieve it thru EO.Someone suggested me use VL to achieve plz help
    Thanks & Regards,

    Hi,
    That would be very nice of you,plz send me the docs and also send me similar docs that would be beneficial for a beginner like me.
    My id is [email protected]
    Thnx for your time.

  • How to search more than one table in database?

    Hello i am new to java
    I create 5 tables. I want search 5 table.
    I use stored procedure.
    we give one keyword that keyword in all tables that column will be display.
    for ex: One tables contains IT employee details of one company and they are working different technologies
    Second table contains IT employee details of another company
    That the problem
    I want to the data who are the java employee and which company belongs. And only display the java employees in all tab les
    Thank u

    sounds like an incredibly bad design.
    different tables for different companies? so every time you add a company you have to add a table?
    i'd recommend a company table with a 1:m relationship with the employee table. it's normalization 101.
    %

  • Smartforms doubts--more than one table

    Hi Experts,
    I have to create one Smartforms having 2 tables in a different-different position.
    I know, we can create only one main window.  how we can cretae 2 tables whose data can flow for next page also and which window we will use for those tables.
    Regards
    Mohit

    You Can have more than two tables in the main window, but in the preview the two tables will not appear side by side. Bcoz, after executing the first table only, the next table data comes in the other window.
    solution:
    Create a New window (make it as another main window) arrange main1 main2 windows besides.
    create a table in new main window and text element, execute the driver program. it will work, make sure the table width should match the main window width other wise you will get error,
    Thanks
    Ravi

  • Developing forms based on more than one table

    I need to develop a form which requires to insert and query data elements from
    more than one table in the database. Can create a view and develop a form based on the view to achieve this functionality? Also is it better to use portal forms for this purpose or Forms developer 6i for this purpose?
    Any inputs/ideas will be greatly appreciated.
    Thanks,
    Suzanne

    Yes you can do more than one table per form in portal.
    You can base a form on two tables in portal if they are designed as master/detail tables. You can also provide linking to other forms passing parameters from a one form to the next to work with multiple tables. Combining more than two tables into a form using portal would require using a view, I believe.
    HTH

  • How can i update more than one table at a time?

    i would like to update more than one table at a time. In Java Studio creator2 how can i do table updation?

    Hi,
    Please go through the below thread might be of help to you.
    http://forum.sun.com/jive/thread.jspa?forumID=123&threadID=51839
    RK

  • How can i use IDSM-2 in inline mode for more than two VLANs?

    can i use the IDSM-2 in inline mode to be ips to more than two VLANS
    like this or it isn't
    intrusion-detection module 5 data port 1 access-vlan 10,20,30,40,50
    intrusion-detection module 5 data port 1 access-vlan 100,200
    thank u all for your help

    The IDSM-2 ports need to be configured as trunk ports with multiple vlans rather than as access ports.
    http://www.cisco.com/en/US/partner/products/hw/vpndevc/ps4077/products_configuration_guide_chapter09186a00807517eb.html#wp1068377
    And instead of creating an inline interface pair by pairing Gig0/7 with Gig0/8 within the IDSM-2 configuration, you would create inline vlan pairs.
    With an inline vlan pair you pair 2 vlans on the same interface.
    You can have up to 255 inline vlan pairs on each interface (assumining you keep the total traffic from all of the pairs within the IDSM-2s performance limit of around 500Mbps)
    How to create inline vlan pairs:
    http://www.cisco.com/en/US/partner/products/hw/vpndevc/ps4077/products_configuration_guide_chapter09186a00807517bb.html#wp1047852
    The other aspect you need to be aware of is that not all IOS versions will support configuring the IDSM-2 data ports as trunk ports for inline vlan pairs.
    Your best bet is to use 12.2(18)SXF4 or a later version on the 12.2(18)SXF train.
    The 12.2(33)SR train does not currently support the trunk feature for the IDSM-2.

  • I have very little space left on the hard drive on my macbook, on my storage report it says "other" is taking up more than two thirds of the space on the hardrive. How can I identify what these files are?

    I have very little space left on the hard drive on my macbook, on my storage report it says "other" is taking up more than two thirds of the space on the hardrive. How can I identify what these files are?

    Hello,
    There is free software you can download that gives you a graphical image of what files are used on your hard drive. http://www.derlien.com/
    This may help you clean down your hard drive for more space.
    Best of luck

Maybe you are looking for