Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003
    Posts
    38

    Unanswered: not able to execute outer join

    Hi,

    Tring to execute an outer join query. To my surprise the results are same as an equi join. would appreciate if anyone throws light on this? FYI, Oracle we are using is 9i.


    SELECT a.custNo, d.dt,a.dt
    FROM sal_bal A, ALL_DATES d
    WHERE a.dt(+) = d.dt

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: not able to execute outer join

    Looks OK. The result will be the same if every ALL_DATES record has a match in SAL_BAL of course. This is what I get:
    PHP Code:
    SQLselect from all_dates;

    DT
    -----------
    24-FEB-2004
    25
    -FEB-2004
    26
    -FEB-2004
    27
    -FEB-2004

    SQL
    select from sal_bal;

        
    CUSTNO DT
    ---------- -----------
             
    1 24-FEB-2004

    SQL
    SELECT a.custNod.dt,a.dt 
      2  FROM sal_bal A
    ALL_DATES d
      3  WHERE a
    .dt(+) = d.dt ;

        
    CUSTNO DT          DT
    ---------- ----------- -----------
             
    1 24-FEB-2004 24-FEB-2004
               25
    -FEB-2004
               26
    -FEB-2004
               27
    -FEB-2004 

Posting Permissions

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