DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: help in joining tables plz

  1. #1
    Join Date
    Jul 2006
    Posts
    96

    help in joining tables plz

    i have two views

    SQL> select * from rep_view1;

    MTR_DT PUR_MTRS PUR_VALUE
    ------ ---------- ----------
    APR-06 113127.12 43475488
    AUG-06 96600.5 33618446
    DEC-06 119020.64 42295513
    JAN-07 166138.29 56924778
    JUL-06 63928.63 21902236
    JUN-06 87352.98 28628466
    MAY-06 91170.11 35456371
    NOV-06 69248.45 24892224
    OCT-06 165008.65 62577612
    SEP-06 211554.59 81388906

    SQL> select * from rep_view3;

    CR_DT CR_MTRS CR_VALUE
    ------ ---------- ----------
    APR-06 10.15 95099
    AUG-06 32.1 147329
    DEC-06 22.75 335965
    FEB-07 0 3856
    JAN-07 182.85 412829
    JUL-06 0 539834
    JUN-06 0 25182
    MAY-06 0 17764
    NOV-06 .8 86452
    OCT-06 203.55 123651
    SEP-06 253.6 98237

    i want to get all the rows with outer join or any other technique.
    i.e i am not able to get feb-07 month row of second view.

    i tired the folliwing
    select * from rep_view1 a, rep_view3 b where a.mtr_dt = b.cr_dt(+);
    but no use.

  2. #2
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    The rep_view1 table must be outer joined:

    select * from rep_view1 a, rep_view3 b where a.mtr_dt(+) = b.cr_dt;
    Ales
    The whole difference between a little boy and an adult man is the price of toys

Posting Permissions

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


Click Here to Expand Forum to Full Width