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
How you can fix the truncated data error in datastage?
Where do the datastage jobs get stored?
What are system variables and sequencers in datastage
Describe the main features of datastage?
Highlight the main features of datastage?
How do you remove duplicate values in datastage?
Differentiate between odbc and drs stage?
What is the difference between odbc and drs stage?
Differentiate between hash file and sequential file?
What are the processing stages?
How to convert RGB Value to Hexadecimal values in datastage?
what is the use of skid in reporting?
What is a merge?
Enlist various types of routines in datastage.
how to connect source to db?generally what r stages u used? how to find the data is having delimiter format?