Hi,
I am filtering data from source file to source file using a transformer. I have a condition which is getting all the tariff which contains USSD. The SQL is [if tariff like '%USSD%' then]. Which function should I use in DS 7.5 to perform that ?
Like function
Moderators: chulett, rschirm, roy
Hi And welcome aboard
,
you can use Basic Match operator for one, or any other function that can veify the existance of a string in a bigger string like Count()/Locate(),Index() and such.
IHTH,
you can use Basic Match operator for one, or any other function that can veify the existance of a string in a bigger string like Count()/Locate(),Index() and such.
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org

Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org

-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Match is the best, as Roy suggested. However it uses idiosyncratic syntax, for example for its wildcard. One syntax that will do the job you seek is the expression (the three dots represent a wildcard). A variant in which "0X" is the wildcard is (Matches is a synonym for Match).
The expressionfinds the first occurrence of "USSD" in Tariff, and may be more efficient. It returns 0 if not found, or the (positive) character position of where it was found.
Code: Select all
InLink.Tariff Match "...USSD..." Code: Select all
InLink.Tariff Matches "0X'USSD'0X"The expression
Code: Select all
Index(InLink.Tariff, "USSD", 1) 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.