Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team
I have a requirement, where i need to transpose rows to columns but its not similar to using tpivot component. I tried using tpivot, normalize, tdenormalize but nothing worked! Providing the sample input and expected output.
Attached the screenshot and also sample data below:
Sample Input Data
--------------------------------------
|Prod_Type |Prod_No | Prod_Price|
--------------------------------------
| 1 |123456 | 24.5 |
| 1 |234567 | 234.6 |
| 1 |345678 | 10 |
| 1 |2412421 | 1000 |
| 1 |7689657 | 345 |
| 1 |456891 | 635.61 |
| 1 |6578709 | 450.11 |
| 1 |999876 | 222 |
Expected Out:
--------------------------------------------------------------------------------------------------------------------------------------------------
S.No| Prod_No_1 |Prod_Price_1 |Prod_No_2 |Prod_Price_2 |Prod_No_3 |Prod_Price_3 |Prod_No_4 |Prod_Price_4 |Prod_No_5 |Prod_Price_5
--------------------------------------------------------------------------------------------------------------------------------------------------
1 | 123456 | 24.5 | 234567 | 234.6 |345678 | 10 | 2412421 | 1000 | 7689657 | 345
2 | 456891 | 635.61 | 6578709 | 450.11 | 999876 | 222 | | | |
Any ideas or approaches to achieve this!
Thanks & Regards
Krishu
Hello,
It seems you are trying to group Prod_Type with the same type. Please have a look at tSortRow and tUniqRow components to achieve your goal.
Best regards
Sabrina
Hi Sabrina
Thanks for the reply!. Am not sure how tSortRow and tUniqRow helps to achieve this!?
Regards
Krishu