eno ename
1 qaz
1 wsx
1 edc
2 zxc
2 asd
3 qwe
3 wer
3 tru
4 rgj
Output:
eno ename count
1 qaz,wsx,edc 3
2 zxc,asd 2
3 qwe,wer,tru 3
4 rgj 1
I want the above output to be solved by DataStage as well and I have to write SQL query for the same output.
Answer Posted / purba
For Datastage:
I/p........sort stage(create key change column for empno.)........ transformer ( here take stage variables count=0,sv1. For sv1 give derivation as(if keychange=1 then sv1=ename else sv1=sv1:',':ename) for count derivation (if keychange=1then count=1 else count=count +1).........remove duplicate stage(retain last)......o/p(desired result)
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Difference between in process and inter process?
What is the difference between validated and compiled in the datastage?
What is the process of killing a job in datastage?
How will you move hashed file from one location to another location?
What are stage variables?
How the ipc stage work?
What is the purpose of interprocessor stage in server jobs?
How to Remove Duplicate using SQL?
Notification Activity
what is ds administrator used for?
Differentiate between odbc and drs stage?
Why do we use exception activity in Datastage?
Difference between IBM DATA STAGE8.5 and DATA STAGE9.1 ?
How to manage date conversion in Datastage?
How a routine is called in datastage job?