Hi
Can you please let me know which function in DataStage is like SUBSTR function in ORACLE?
Requirement: Source and Target is Sequential File
Input Data : 123456.1234578
Output Data: 456.12
Logic Cut String from 4th Character to 10th Character (including Decimal)
Can you please let me know how can I achieve this in DataStage?
Thanks
Sameer
SubStr Function
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It's done with square bracket notation if you are using a Transformer stage. Syntax is string[start,length] so, in your case,
There is also a substring function for the Modify stage if you are preferring to use that. Beware, though, that counting in the Modify stage is zero-based whereas in the Transformer stage it is one-based.
Code: Select all
InLink.TheString[4,6]
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.
SubStr : Cut String
Thanks Ray.I tried the String Function however it is not working.
I am not able to see your email completely.
Please let me know if there is any function / workaround for this.
I am not able to see your email completely.
Please let me know if there is any function / workaround for this.