Splitting Concatenated Strings
Posted: Fri Nov 12, 2004 4:33 am
I have a file consisting of multiple rows containing multiple Surrogate Keys concatenated together against a single Natural Key.
For example,
I am now wanting to split this concatenated string up so that for every instance of a surrogate key, a row is created, as below.
I am wanting to either action this in a transformer or within an INSERT statement on DB2 if possible as the data will be loaded into a DB2 table.
Any suggestions ?
Jez
For example,
Code: Select all
Surr Key Nat Key
1:2:3:4 ABC
5:6:7:8 DEF
Code: Select all
Surr Key Nat Key
1 ABC
2 ABC
3 ABC
4 ABC
5 DEF
6 DEF
7 DEF
8 DEF
Any suggestions ?
Jez