Hi,
need help regarding spliting data from one field, and send it to two fields,
example:
ID | FIELD1 | FIELD2
MRPG2001 | |
RESULT:
ID | FIELD1 | FIELD2
MRPG2001 | MRP | G2001
how to split data from one field in to two fields
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
Have a look at the server job developers guide in your DataStage documentation. There is a section there on string functions. There are many ways to split up a string, the LEFT and RIGHT functions can split your string if you are always taking 3 and 5 characters.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
That and as another example, the ever popular substring operator - the square brackets.
For example:
MRPG2001[1,3] = MRP
MRPG2001[4,5] = G2001
Best to read up as Vince suggested, so that you know about all of the Weapons of Mass Deconstruction at your disposal.![Wink :wink:](./images/smilies/icon_wink.gif)
For example:
MRPG2001[1,3] = MRP
MRPG2001[4,5] = G2001
Best to read up as Vince suggested, so that you know about all of the Weapons of Mass Deconstruction at your disposal.
![Wink :wink:](./images/smilies/icon_wink.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers