Converting Vertical PIVOTing without using PIVOT stage in DataStage.
Ex:
DEPT_NO EMPNAME
10 Subhash
10 Suresh
10 sravs
Output:
DEPT_NO EMP1 EMP2 EMP3
10 subhash suresh sravs
2) How to implement Horizontal PIVOTing without using PIVOT stage.

Answers were Sorted based on User's Feedback



Converting Vertical PIVOTing without using PIVOT stage in DataStage. Ex: DEPT_NO EMPNAME 10 Subha..

Answer / datastage4you

Use transformer stage to achieve the same

Is This Answer Correct ?    2 Yes 0 No

Converting Vertical PIVOTing without using PIVOT stage in DataStage. Ex: DEPT_NO EMPNAME 10 Subha..

Answer / reddymkl.dwh

Use Transformer Stage:
Take two stage variable
sv1= if sv2=DEPT_NO then sv1 : ' ' : EMPNAME
sv2= DEPT_NO
Derivation : Trim(sv1, ' ','L')
U will get output.

Is This Answer Correct ?    0 Yes 1 No

Converting Vertical PIVOTing without using PIVOT stage in DataStage. Ex: DEPT_NO EMPNAME 10 Subha..

Answer / reddymkl.dwh

Use Transformer Stage:
Take stage variable,
sv1 = sv1 : ' ' : DSLink.EMPNAME
Derivation : Trim(sv1, ' ','L')
U will get output.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Data Stage Interview Questions

Name the command line functions to import and export the DS jobs?

0 Answers  


how can we validate the flat files using the date in the header and number of records in the flat file? Using both conditions at a time.

0 Answers   JPMorgan Chase,


source 1123445 I WANT OUTPUT AS DUPLICATES TO TARGET1 LIKE TARGET1 1144 NON-DUPLICATES TO TARGET2 TARGET2 235

6 Answers   US Technology,


What is a datastage job?

0 Answers  


What is exact difference between Parallel Jobs and server Jobs..

8 Answers   DELL, IBM,






how to get sum of sal based on dept_no and then sum of all sal irrespective of dept_no in same sql. output:- 10, 200(sum of sal for dept_no 10), 5000(sum of all sal)

0 Answers  


hi my source is:: empno,deptno,salary 1, 10, 3.5 2, 20, 8 2, 10, 4.5 1, 30, 5 3, 10, 6 3, 20, 4 1, 20, 9 then target should be in below form... empno,max(salary),min(salary),deptno 1, 9, 3.5, 20 2, 8, 4.5, 20 3, 6, 4, 10 can anyone give data flow in data stage for the above scenario.... thanks in advance...

5 Answers  


How to work with XML out put stage? Please explain step by step? i need to generate XML file using Table data. Given is the .XSD file. Please help?

2 Answers   TCS,


I have a source like file it have Number of records and i want to load without first and last records in target?Datastage?

4 Answers   CSC,


6) my sorce d1 d2 d1 d2 d1 d3 d2 d1 my target tartget 1 d1 2 d1 3 d1 4 d1 target2 1 d2 2 d2 3 d3 Target 3 1 d3 Can any body send me answer this is argent requierment

3 Answers   TCS,


You enter values in a schema file for RCP and you also entered values in sequential file? which one will it take?

1 Answers   TIAA CREF,


Hai..,This Kiran . how to immlement SCD's through sequential file.please explain briefly.if nt ask me i will explain ,what i know.

2 Answers  


Categories