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
how to delete one row in target dataset
Differentiate between datastage and datastage tx?
Define ds designer?
project Steps,hits, Project level HArd things,Solved methods?
how to use self join using datastage ? can u tell me using stage how can we implemnet the self join
Source has 2 columns: USA,NewYork INDIA,MUMBAI INDIA,DELHI UDS,CHICAGO INDIA,PUNE i want data in target like below: INDIA,MUMBAI1 INDIA,DELHI2 INDIA,PUNE3 USA,NEWYORK1 USA,CHICAGO2
How can we improve the performance in datastage?
What is the difference between the local container and shared container?
What are datastage sequences?
How can we improve performance of data stage jobs?
What is job control?
What is difference between join, merge and lookup stage?
What is data partitioning?
What are the types of hashed files in data stage
Can you explain link buffering?