Specifying "Between" / "Range" rule in I

This forum contains ProfileStage posts and now focuses at newer versions Infosphere Information Analyzer.

Moderators: chulett, rschirm

Post Reply
Maximus_Jack
Premium Member
Premium Member
Posts: 139
Joined: Fri Apr 11, 2008 1:02 pm

Specifying "Between" / "Range" rule in I

Post by Maximus_Jack »

Hi
how to specify in the rule definition to find range operation for a data source?
for example if i want to find whether a column "column_a" has values in the range between "1 to 9"

i tried( column_a >=1 and column_a < 10 )
and column_a matches_regex '[1- 9]'

both are not working, can somebody please help me ?

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

Post by ray.wurlod »

What does "not working" mean here? Depending on the data type, both of the expressions you provided are valid.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Maximus_Jack
Premium Member
Premium Member
Posts: 139
Joined: Fri Apr 11, 2008 1:02 pm

Post by Maximus_Jack »

hi ray, thanks for responding, the problem is, i'm trying to translate the below query into a rule, but i'm getting different row counts

query
=====
select count(1)
from table1
where col1 is null
and col4 = 'orange'
and column_a between 1 and 9
and col2 = "apple"

Data rule
======
if ( trim(col1)= ''
and col4 = 'orange'
and (column_a >= 1 and column_a <=9)
)
then
col2 = 'apple'

where i'm going wrong here, note: column_a is integer
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Try using an EXISTS test on col1

Code: Select all

(NOT EXISTS col1) AND col4 = "orange" AND column_a >= 1 AND column_a <= 9 AND col2 = "apple"
Last edited by ray.wurlod on Tue Aug 06, 2013 4:31 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply