Like Operator in Transform

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
rxs0005
Participant
Posts: 18
Joined: Fri Oct 07, 2005 4:29 am

Like Operator in Transform

Post by rxs0005 »

hi all

the logic is like this

BALLOON_INDICATOR = 'Y' if PRODUCT_TYPE like '%alloon%'

I have translated it to the below in the Transformer it does not seem to work

If tpo_loan_orig_out.PRODUCT_DESCRIPTION Matches "%alloo%" Then "Y" Else "N"

i also tried

If tpo_loan_orig_out.PRODUCT_DESCRIPTION Matches "alloo" Then "Y" Else "N"

how do i do this logic


basically i need an equivalent to the LIKE operator in ORacle

thanks

rxs0005
rwierdsm
Premium Member
Premium Member
Posts: 209
Joined: Fri Jan 09, 2004 1:14 pm
Location: Toronto, Canada
Contact:

Re: Like Operator in Transform

Post by rwierdsm »

Why don't you try:

if Index (tpo_loan_orig_out.PRODUCT_DESCRIPTION , 'alloo', 1) > 0 then 'Y' else 'N'

Rob Wierdsma
Rob Wierdsma
Toronto, Canada
bartonbishop.com
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Here, try this. It works for me. I bet it will work for you

If trim(tpo_loan_orig_out.PRODUCT_DESCRIPTION) Matches "...alloo..." Then "Y" Else "N"
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DataStage server job expressions do not use SQL wildcards. DataStage server job expressions have a more flexible set of pattern matching capabilities which you can read about in on line Help (topic Pattern Matching Operators) or in the DataStage BASIC manual.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rxs0005
Participant
Posts: 18
Joined: Fri Oct 07, 2005 4:29 am

Post by rxs0005 »

DSguru2B

that worked !!

thanks!!

rxs0005
Post Reply