Where Clause of Filter stage

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
DS_FocusGroup
Premium Member
Premium Member
Posts: 197
Joined: Sun Jul 15, 2007 11:45 pm
Location: Prague

Where Clause of Filter stage

Post by DS_FocusGroup »

Hi all

Someone can help me out as i want to apply filter stage condition which can check for length of a column and based on it data could be transferred to different output streams.where condition currently used is

length(col_name) = 2

but i am getting below error

filter_countryname: Parse error: Expected comparison, 'between', or 'like' operator, got: "("
Parse error: Expected boolean operator (and, or) got: "country".
Parse error: Expected comparison, 'between', or 'like' operator, got: "("
Parse error: Expected boolean operator (and, or) got: "country".

Regards,
pxraja
Participant
Posts: 142
Joined: Fri Mar 14, 2008 10:22 am

Post by pxraja »

hi,

try without brackets,
length col_name =2

or else
try to handle it in source query itself.
DS_FocusGroup
Premium Member
Premium Member
Posts: 197
Joined: Sun Jul 15, 2007 11:45 pm
Location: Prague

Re: Where Clause of Filter stage

Post by DS_FocusGroup »

Its giving same sort of error.Filter where is like a constraint so i am wondering there should be a way to handle length function ......





DS_FocusGroup wrote:Hi all

Someone can help me out as i want to apply filter stage condition which can check for length of a column and based on it data could be transferred to different output streams.where condition currently used is

length(col_name) = 2

but i am getting below error

filter_countryname: Parse error: Expected comparison, 'between', or 'like' operator, got: "("
Parse error: Expected boolean operator (and, or) got: "country".
Parse error: Expected comparison, 'between', or 'like' operator, got: "("
Parse error: Expected boolean operator (and, or) got: "country".

Regards,
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

SQL functions are not permitted in the WHERE clause of a Filter stage. Refer to the Parallel Job Developer's Guide for full information about what is permitted.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dxk9
Participant
Posts: 105
Joined: Wed Aug 19, 2009 12:46 am
Location: Chennai, Tamil Nadu

Post by dxk9 »

You can probably calculate the length and store it in a different field in the transformer (prior to the filter) and then use that field in the filter condition.

Regards,
Divya
Post Reply