Page 1 of 1

Job design

Posted: Thu Apr 05, 2012 1:24 am
by Noozeethullah
Hi guys I am stuck up with the job design for the below sql queries. Please help:

select empno from emp_1 minus select empno from emp_2;

I need the emp_1 rejected empno into the target file

Posted: Thu Apr 05, 2012 2:41 am
by kandyshandy
User defined SQL in respective DB stage!!

Posted: Thu Apr 05, 2012 2:57 am
by pandeesh
What about using difference stage ,if you want to do in datastage?

Posted: Mon Apr 09, 2012 6:02 am
by udayk_2007
How abt using a lookup. The reject file of the look-up will give you the required data.

Regards
Ulhas

Posted: Mon Apr 09, 2012 7:27 am
by priyadarshikunal
There are many ways to do it but I should ask what the OP has tried?

Posted: Mon Apr 09, 2012 11:21 am
by mobashshar
Hi Sahana,
You should get the empno not present in emp_2 table by using this query. Nothing wrong in sql.
What is your requirement?

Posted: Mon Apr 09, 2012 1:16 pm
by jerome_rajan
Just so I understand, you need all empno from emp_1 that are not present in emp_2, right?

Off the top of my head, I can think of a design with a lookup.

The primary link will have emp_1 data and the reference link will have emp_2. perform a lookup on empno.
The data rejected by the lookup would be the data not present in emp_2. You can capture this in a reject file and use it downstream.

Hope this helps.