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 do you run datastage job from the command line?
Explain Quality stage?
How do y read Sequential file from job control?
What is the use of datastage director?
what are .ctl(control files) files ? how the dataset stage have better performance by this files?
Distinguish between informatica & datastage. Which one would you choose and why?
Define data aggregation?
im new to this tool im now at project plz tell me step by step process how to design plz help me i wnt to go with exp for job plz give me d proper design and explination
Can you define merge?
What is merge stage?
What are the different type of jobs in datastage?
Can you explain link buffering?
1)How will u implement SCD2 by using surrogate key. 2)What are the disadvantages with surrogate key. 3)How will you handle nulls in your project for the varchar, integer data types. 4)Can I use two fact tables in star schema. 5)3 jobs are running on the 2 nodes after I added one more node so can I compile those jobs to run on three nodes.
What are datastage sequences?
How do u convert the columns to rows in datastage?