Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get full output with full joint?

Poor-BoySep 2 2016 — edited Sep 2 2016

i have two tables with structure

SQL> select * from tabl1;

SUPPLIER_ID SUPPLIER_NAME

----------- --------------------

      10000 IBM

      10001 Hewlett Packard

      10002 Microsoft

      10003 NVIDIA

SQL> Select * from tabl2;

  ORDER_ID SUPPLIER_ID ORDER_DAT

---------- ----------- ---------

    500125       10000 12-MAY-03

    500126       10001 13-MAY-03

    500127       10004 14-MAY-03

I am trying to show the out put like this

SUPPLIER_ID ORDER_DAT

----------- ---------

      10000 12-MAY-03

      10001 13-MAY-03

      10002

      10003

      10004           14-MAY-03

this query which i am trying to get the output

Select t1.supplier_id,t2.order_Date from tabl1 t1 , tabl2 t2 where t1.supplier_id = t2.Supplier_id(+)

union

Select t1.supplier_id,t2.order_date from tabl1 t1 , tabl2 t2 where t1.supplier_id(+) = t2.Supplier_id;

but getting output like this

SUPPLIER_ID ORDER_DAT

----------- ---------

      10000 12-MAY-03

      10001 13-MAY-03

      10002

      10003

            14-MAY-03

This post has been answered by AndrewSayer on Sep 2 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 30 2016
Added on Sep 2 2016
10 comments
368 views