Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    Atlanta, GA
    Posts
    21

    Unanswered: Querying Multiple Tables

    I'm trying to run a report based on data from 5 different tables. The tables have about 10 common fields. My query is like

    select Order_, ckttid, PO_ ,
    to_char(to_date('01/01/1970', 'MM/DD/YYYY') + ((Orderdate- 18000)/(60*60*24)),'MM/DD/YYYY') ,
    decode (type,0,'New', 1,'old',2, 'Dis',3,'used',4,'Cancel') ,
    decode(type,0,(to_char(to_date('01/01/1970', 'MM/DD/YYYY') + ((Orderdate- 18000)/(60*60*24)),'MM/DD/YYYY')),1,(to_char(to_date('01/01/1970', 'MM/DD/YYYY') + ((Createdate- 18000)/(60*60*24)),'MM/DD/YYYY')),2,(to_char(to_date('01/01/1970', 'MM/DD/YYYY') + ((Changeddate- 18000)/(60*60*24)),'MM/DD/YYYY')),3,null),
    decode(Ordertype,2,(to_char(to_date('01/01/1970', 'MM/DD/YYYY') + ((Modifieddate- 18000)/(60*60*24)),'MM/DD/YYYY')), null)
    from tableA

    This query is running fine for tableA, but I will like to enhance the query to be able to retrieve records from tableB....tableE.

    Any suggestion on how to go about it? Thanks
    Last edited by daymauler; 02-05-04 at 12:47.
    It pays to share!

  2. #2
    Join Date
    Jul 2003
    Posts
    2,296
    desc table_A
    desc table_B
    desc table_C
    etc.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  3. #3
    Join Date
    Feb 2004
    Location
    Atlanta, GA
    Posts
    21
    Thanks I figured it out.
    It pays to share!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •