hOW CAN i IMPLEMENT A SQL 'BETWEEN' IN AN TRANSFORMATION

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
LANDO
Participant
Posts: 16
Joined: Mon Jan 09, 2006 3:35 am

hOW CAN i IMPLEMENT A SQL 'BETWEEN' IN AN TRANSFORMATION

Post by LANDO »

Hi All,

I'm have 2 tables A: have person age
B: A certain id for age range.
meaning : Person with age value of 24 in table A
will mean in table B id : 3 start_age: 20, end_age: 25

so when I join these table in SQL and ask for the id the sql statement will look like this:
select b.id
from a,b
where a.age between b.start_age and b.end_age

how can implement the above in a transformation, I know I can try and use custom SQL, but is there a way to do it via the transformation it self
Best Regards,
Lando
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Create a transform function (Routine). Best is to use searchable structures - dynamic arrays or Btree files - that are cached in memory (declared as COMMON).
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