Result as per Double Outer Join ? [message #618587] |
Mon, 14 July 2014 02:23 |
|
bluetooth420
Messages: 146 Registered: November 2011
|
Senior Member |
|
|
Dear All,
Here are tables and requirement:
create table t1 (sno number(3), incoming varchar2(4));
insert into t1 values (1, 'A');
insert into t1 values (2, 'B');
insert into t1 values (3, 'C');
insert into t1 values (4, 'D');
create table t2 (sno number(3), outgoing varchar2(4));
insert into t2 values (1, 'E');
insert into t2 values (2, 'F');
insert into t2 values (3, 'G');
insert into t2 values (5, 'H');
Required
Quote:Sno, incoming, outgoing
1, A, E
2, B, F
3, C, G
4. D, (null)
5, (null), H
What i have done and achieved is the following query ran into oracle reports with matrix and got my desired output
select sno, 'Inco', incoming
from t1
union all
select sno, 'Ootgo', outgoing
from t2
How is it possible in SQL?
|
|
|
|
|
|