Here’s an example:

try drop table #tb1; catch all end try;

try drop table #tb2; catch all end try;

create table #tb1(id integer, test char(20));

create table #tb2(id integer, test char(20));

insert into #tb1(id, test) values(1,’a’);

insert into #tb1(id, test) values(2,’a’);

insert into #tb1(id, test) values(3,’a’);

insert into #tb1(id, test) values(4,’a’);

insert into #tb2(id, test) values(1,’a’);

insert into #tb2(id, test) values(2,’b’);

insert into #tb2(id, test) values(3,’b’);

insert into #tb2(id, test) values(4,’a’);

select a.id, a.test, b.id, b.test

from #tb1 a

full outer join #tb2 b on a.id=b.id and a.test=b.test

where a.id is null or b.id is null

New NetWeaver Information at SAP.com

Very Helpfull

User Rating: Be the first one !