Input Data is:
Emp_Id, EmpInd
100, 0
100, 0
100, 0
101, 1
101, 1
102, 0
102, 0
102, 1
103, 1
103, 1
I want Output
100, 0
100, 0
100, 0
101, 1
101, 1
Means Indicator should either all ZEROs or all ONEs per
EmpId.
Impliment this using SQL and DataStage both.
Answer Posted / subhash
In DataStage:
SRC--->CPY---->JOIN----TFM---TGT
--------|---- /
--------|--- /
--------|-- /
--------|- /
--------AGG
In AGG, GROUP BY EmpId, calculate MIN and MAX for each
EmpId.
JOIN both one copy from CPY and 2nd Aggrigated copy from
AGG.
In TFM, put constraint: IF MIN=MAX, then populate to TGT
then u will get required output.
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
Describe routines in datastage? Enlist various types of routines.
What is oci?
What is a quality stage in datastage tool?
What are the repository tables in datastage?
Define project in datastage?
Difference between server jobs & parallel jobs?
What is a datastage job?
What is active and passive stage?
What are the types of containers?
Why we use surrogate key?
What is apt_config in datastage?
What are iconv and oconv?
What is orabulk stage?
Difference between IBM DATA STAGE8.5 and DATA STAGE9.1 ?
What is ds designer?