Hello, everyone! I am new here. This is my first time post the topic. First allow me thank all the people who answer my question.
I want to select a result from table A, but A. ID NOT IN B. ID.
EXP:
SELECT A.ID,A.NAME FROM A,B WHERE A.ID <> B.ID.
How can I achieve this.
Table A and table B not in the same database.
I want to user 2 DB2 STAGE.
Thank you very much.
DS Select not in another table
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 21
- Joined: Fri Jul 29, 2011 8:02 am
-
- Participant
- Posts: 2
- Joined: Tue Sep 07, 2010 3:23 am
You can do this in datastage by doing a lookup on two tables using a lookup stage and then filtering the output of the lookup stage in transformer for null/blank records from the second table. This is like executing a below statement in SQL..
select A.*
from
Table A,
Table B
where
A.ID = B.ID(+) and B.ID is null
select A.*
from
Table A,
Table B
where
A.ID = B.ID(+) and B.ID is null
-
- Participant
- Posts: 21
- Joined: Fri Jul 29, 2011 8:02 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: