0
- 我有表,該表由幾個標題代碼標題代碼讀取文本文件塊(它總是與HDR開始)
- 每頭將擁有自己的BHD(開始)和BTR (結束)標籤
I需要爲每個塊添加相應的標題值作爲新列。如何通過基於塊的在SSIS
樣品表:
HDR20170101
BHD0000A123J010203
0020CHETRI || ULTRA DELUXE || 123UD || 00:20
0300CHETRIKK02S || DELUXE || 908UU || 03:00
0330CHETRIKK02S || DELUXE || 908BN || 03:30
BTR0000A123J010203DHU84596
HDR20170102
BHD0000A123J010225
0400CHETRIKK02O || ORDINARY || 908AH || 04:00
0400CHETRIKK02S || DELUXE || 908BN || 04:00
0500CHETRIKK02O || ORDINARY || 908AC || 05:00
0515CHETRIKK02S || DELUXE || 908AE || 05:15
BTR0000A123J010225DHU59658
HDR20170103
BHD0000A123J010242
0530CHETRIKK04O || ORDINARY || 2251 || 05:30
0615CHETRIKK02S || DELUXE || 908BC || 06:15
BTR0000A123J0100242DHU34745
預期輸出:
Trip Code || ClassOfServ || Route || Depart || Header
0020CHETRI || ULTRA DELUXE || 123UD || 00:20 || HDR20170101
0300CHETRIKK02S || DELUXE || 908UU || 03:00 || HDR20170101
0330CHETRIKK02S || DELUXE || 908BN || 03:30 || HDR20170101
0400CHETRIKK02O || ORDINARY || 908AH || 04:00 || HDR20170102
0400CHETRIKK02S || DELUXE || 908BN || 04:00 || HDR20170102
0500CHETRIKK02O || ORDINARY || 908AC || 05:00 || HDR20170102
0515CHETRIKK02S || DELUXE || 908AE || 05:15 || HDR20170102
0530CHETRIKK04O || ORDINARY || 2251 || 05:30 || HDR20170103
0615CHETRIKK02S || DELUXE || 908BC || 06:15 || HDR20170103