Hi there,
Have two tables A & B joined on key called system_key they hold several cols each. I want to find any orphan records in A i.e. where the link is dead or unbroken I'd like to identify these recs for possible deletion before srchiving. I can get the result I want using a minus statement i.e.
select system_key from tableA
minus
select system_key from tableB;
however I feel this qry coud be better by using joins trouble is I can't get them to work, here's what I have;
SELECT A.system_key
FROM tableA A, tableB B
WHERE A.SYSTEM_KEY(+)= B.SYSTEM_KEY
AND B.SYSTEM_KEY IS NULL;
it just seems to return columns of zero's though, any ideas how I can write this using a join ?
Many thanks,
Mully
Have two tables A & B joined on key called system_key they hold several cols each. I want to find any orphan records in A i.e. where the link is dead or unbroken I'd like to identify these recs for possible deletion before srchiving. I can get the result I want using a minus statement i.e.
select system_key from tableA
minus
select system_key from tableB;
however I feel this qry coud be better by using joins trouble is I can't get them to work, here's what I have;
SELECT A.system_key
FROM tableA A, tableB B
WHERE A.SYSTEM_KEY(+)= B.SYSTEM_KEY
AND B.SYSTEM_KEY IS NULL;
it just seems to return columns of zero's though, any ideas how I can write this using a join ?
Many thanks,
Mully