Hi,
I am converting ETL work built in SQL to DataStage. I have a statement which uses case statement with the "LIKE" command and I donot have the temp table, so how do I get the functionality of the LIKE command in DS transformer.
For example I have the following command
SELECT CUSTOMER,
PRODUCT,
CASE when DESC like '%T%' and FAMILY like '%TRY%' and CUSTOMER IN ('X1','X2','X3') then 'CASE1'
when LOCATION in ('LAX','CMH') then 'PRO'
Thanks,
Use "LIKE" functionality in transformer
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The Transformer stage uses non-SQL pattern matching.
Read about pattern matching in the on-line help or the DataStage BASIC manual.
Example:
inlink.Desc Matches "...T..." (the three dots is a wildcard matching any number of characters)
inlink.ProdCode Matches "2A3N..." (ProdCode must begin with two alphabetic characters followed by three numeric characters)
Read about pattern matching in the on-line help or the DataStage BASIC manual.
Example:
inlink.Desc Matches "...T..." (the three dots is a wildcard matching any number of characters)
inlink.ProdCode Matches "2A3N..." (ProdCode must begin with two alphabetic characters followed by three numeric characters)
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.