Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

How to Transform pivot across mulitple columns and group by in Data Flow Task

$
0
0

XML Source

Columns : BankSeq| code| Branch|BankAcc| BankId

values :   

1   | 101 | test_branch_X | test_Acc_p| 20

2   | 111 | test_branch_Y | test_Acc_q| 20

1   | 121 | test_branch_30 | test_Acc_102 | 30

2   | 300 | test_branch_40 | test_Acc_500 | 40

In Data flow task, we need to group by required on BankID, BankSeq values are fixed (1, 2)

Expected output

Bank1Code| Bank1Branch| Bank1BankAcc|Bank2Code| Bank2Branch| Bank2BankAcc| BankId

101 | test_branch_X| test_Acc_p| 111 | test_branch_Y| test_Acc_q| 20

121 |  test_branch_30 | test_Acc_102 | NULL | NULL |NULL| 30

NULL | NULL  | NULL | 300 | test_branch_40 | test_Acc_500| 40


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>