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
What is process model?
How do you start developing a datastage project?
What is the purpose of pivot stage and types of containers in datastage
How to write a expression to display the first letter in Caps in each word using transformer stage ? Please let me know ASAP Thanks in advance...
what is use of SDR function?
What is the use of hoursfromtime() function in transformer stage in datastage?
what is ds administrator used for?
Define ds designer?
Difference between in process and inter process?
How do you schedule or monitoring the job?
How can we perform the 2nd time extraction of client database without accepting the data which is already loaded in first time extraction?
Field,NVL,INDEX,REPLACE,TRANSLATE,COLESC
What are the different types of lookups in datastage?
What is the command line function to import and export the ds jobs?
What is the difference between an operational datastage and a data warehouse?