Datastage server 7.5 like function
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 36
- Joined: Fri May 21, 2010 12:40 am
- Location: Bangalore
Datastage server 7.5 like function
do we have a like function or similar type of function in Datastage 7.5 server edition. We have values A.12,A.12-1 but we might get other values in the future(like A.12-3). I am in need of some function which can take the values in this way(A.12%).
Sandeep Chandrashekar
-
- Participant
- Posts: 342
- Joined: Tue Nov 04, 2008 10:38 am
- Location: Chennai, India
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There is no Like operator or function in version 7.5. There is, however, a Matches operator. This uses DataStage BASIC pattern matching, in which either "..." or "0X" is the general wildcard. So a suitable expression for your stated requirement would be
Code: Select all
InLink.TheField Matches "'A.12'0X"
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.
Why over-complicate it? As noted, you can "match" the first four characters of the string like so:
Code: Select all
YourField[1,4] = "A.12"
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers