Filter Stage - Special character handling

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
muralisankarr
Premium Member
Premium Member
Posts: 83
Joined: Tue Oct 28, 2008 1:55 am
Location: Chennai

Filter Stage - Special character handling

Post by muralisankarr »

Is there any way we have to add the ESCAPE option in Filter Stage Where property. I'm trying to implement the following oracle statement in Filter stage
job_id LIKE 'SA\_%' ESCAPE '\'
How to handle the '_' and '%' character when they are part of search sting?

Many Thanks
MSR
The minute you start talking about what you're going to do if you lose, you have lost
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What makes you think it supports Oracle syntax? Why don't you spell out in words what it is you are trying to implement?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Akumar1
Participant
Posts: 48
Joined: Tue May 22, 2007 3:38 am
Location: bangalore
Contact:

Post by Akumar1 »

parameterize that..
Akumar
muralisankarr
Premium Member
Premium Member
Posts: 83
Joined: Tue Oct 28, 2008 1:55 am
Location: Chennai

Post by muralisankarr »

chulett wrote:What makes you think it supports Oracle syntax? Why don't you spell out in words what it is you are trying to implement?
I'm not particular about oracle functionality. As Filter stage support LIKE operator on pattern search, just want to know how to go about the meta character (% and _) when they are part of search string. In oracle we can use ESCAPE clause. But is there any way handle the meta characters in datastage LIKE opration.
The minute you start talking about what you're going to do if you lose, you have lost
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The LIKE operator in a Filter stage uses asterisk (*) as a wildcard. It's all explained in the manual. I don't believe there's any single character match available.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
muralisankarr
Premium Member
Premium Member
Posts: 83
Joined: Tue Oct 28, 2008 1:55 am
Location: Chennai

Post by muralisankarr »

ray.wurlod wrote:The LIKE operator in a Filter stage uses asterisk (*) as a wildcard. It's all explained in the manual. I don't believe there's any single character match available.
The RegEx functionality of filter operator is explained in OEM manuals. When I tested the pattern match with oracle like syntax it worked fine:!: . The oracle type of search yields positive result. But it is not documented. My test condition is to pass the records for which the third character in the job_id column is '_'. The where clause in the filter stage is JOB_ID LIKE '__\_%'
The minute you start talking about what you're going to do if you lose, you have lost
Post Reply