Hi,
In one of my existing Jobs, we are using a SQL query to fetch records from different tables. One of the Join condition used is LIKE option between two columns from two different tables. Now i have to extract the records simply using the table and need to handle the logic & join function in Datastage.
Ex:
table1.column1 LIKE table2.column%
ABC AB%
ABD ABC%
Iam just appending % to the table2 column in the extract query, so accordingly i should get the required join output. How to handle this LIKE option in Data stage. Please help me.
Thanks.
LIKE Operation
Moderators: chulett, rschirm, roy
LIKE Operation
Gopinath
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Hi Ray,
I have to handle this LIKE operation between two different datasets. i.e) from the extract Query i will handle some logical functions in Data stage and load into a dataset. Then from two different streams(Dataset1 & Dataset2) i need to handle this LIKE operation.
Can u pls guide me.
Thanks.
I have to handle this LIKE operation between two different datasets. i.e) from the extract Query i will handle some logical functions in Data stage and load into a dataset. Then from two different streams(Dataset1 & Dataset2) i need to handle this LIKE operation.
Can u pls guide me.
Thanks.
Gopinath
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Does the reference INTO WHICH you are doing the LIKE come from any database table? If yes, you can push LIKE in the stage linking the table rather than using the dataset which is the result of its extraction.
Alternatively you can write a buildop to look for pattern.
Btw, how big is this LIKE table? The size of this table can give you more options.
Alternatively you can write a buildop to look for pattern.
Btw, how big is this LIKE table? The size of this table can give you more options.
Re: LIKE Operation
That's what they are doing now. For some reason there's a need to change that.Gopinath wrote:In one of my existing Jobs, we are using a SQL query to fetch records from different tables. One of the Join condition used is LIKE option between two columns from two different tables.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom