Rows pivoting

Source:
col2 col1
a 1
b 1
c 1
d 1
p 2
q 2
r 2
x 3
how to do this...
thanks
krishna

Questions by krishnaadapa

Showing Answers 1 - 9 of 9 Answers

snehal

  • Mar 5th, 2014
 

pivoting means aggregating...

u can do a group by on col1

  Was this answer useful?  Yes

Shiva

  • Jan 14th, 2015
 

Pivoting means converting rows to column and vise verse.

Please use normalization transformation to achieve this.

  Was this answer useful?  Yes

Manjunath

  • Apr 9th, 2015
 

Converting rows into columns is de-normalizing, you may have to use aggregate transformation to do so.
Note: vice verse is normalizing the data, that can be done using normalizer transformation.
Use a sequence generator transformation before the agg tx, do not group by any column. populate each of the variable port by each row.
ex;
v_filed1=IIF(SEQ=1,i_filed1)
o_filed1=max(v_filed1)
use an agg tx for each column for the source table. In this case use two agg tx and union the output of all the agg tx.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions