I am aware of the function FIELD in transformer that
FIELD(Lnk_InLoad.COLUMN1,';',1) will return the first value store before semicolon.
However, I have a requirement which a column contained of multiple value separated by pipe. There is no fixed number of value will store within the column.
header col1","col2","col3","col4
eg. 001","GRH","DR|PH|JH|ST","2007
above sample data is delimiter with double-quote-comma-double-quote.
And the multiple value column is DR|PH|JH|ST
How do I achieve in such that i will need to separate one row of data into several rows depend on the number of value stored in the column (col3)
Thanks in advance for your help.
FIELD function
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 76
- Joined: Mon Mar 05, 2007 9:26 pm
- Location: Malaysia
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Can't you stop people providing you with such crappily structured files?
Field(InLink.TheString, "|", 1, 1) gives the first field from the delimited string, Field(InLink.TheString, "|", 2, 1) gives the second field, and so on. Parse into separate fields then Pivot.
Field(InLink.TheString, "|", 1, 1) gives the first field from the delimited string, Field(InLink.TheString, "|", 2, 1) gives the second field, and so on. Parse into separate fields then Pivot.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 76
- Joined: Mon Mar 05, 2007 9:26 pm
- Location: Malaysia
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: