Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I'm struggling with building an SSIS package that will read data from Oracle Database and save that to .TXT file delimited in Tab format. But I'm looking for de-normalize the resultset depending on one field called CSERIAL, if that field is repeated in the resultset, then I will flip the following columns

(TYPENAME, TYPEVALUE, TYPESLOTNUM)

to 5 sets of three columns

(TYPENAME1, TYPEVALUE1, TYPESLOTNUM1......TYPENAME5, TYPEVALUE5, TYPESLOTNUM5) :
CBILLINGHEADEND CBILLINGLOCATION CBILLINGSTATUS CBILLINGSTATUSDESCRIPTION CSERIAL TYPENAME TYPEVALUE TYPESLOTNUM

110532295301 D SABVFCXMX 41 54:D4:6F:7A:AE:7B 1
110532295301 D SABVFCXMX 51 54:D4:6F:7A:AE:7A 2

That will be transposed to:

CBILLINGHEADEND CBILLINGLOCATION CBILLINGSTATUS CBILLINGSTATUSDESCRIPTION CSERIAL TYPENAME1 TYPEVALUE1 TYPESLOTNUM1 TYPENAME2 TYPEVALUE2 TYPESLOTNUM2 TYPENAME3 TYPEVALUE3 TYPESLOTNUM3 TYPENAME4 TYPEVALUE4 TYPESLOTNUM4 TYPENAME5 TYPEVALUE5 TYPESLOTNUM5
110532295301 D SABVFCXMX 41 54:D4:6F:7A:AE:7B 1 51 54:D4:6F:7A:AE:7A 2

If there going to be additional values they will fill the field for set 3 then set 4 then set 5.

I tried to do this using the script component but that didn't work with me.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900