User Defined Criteria in Hash File Lookups

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
Sreenivas
Participant
Posts: 12
Joined: Thu Dec 08, 2005 3:43 am

User Defined Criteria in Hash File Lookups

Post by Sreenivas »

Hi,

I am trying to use a lookup for the following:
I wrote BEGIN_DT and END_DT columns from record to a Hash File, now i am trying to use a Date as ACCOUNTING_DT to look into the file to pick up the valid BEGIN_DT and END_DT.
I want to use the condition as BEGIN_DT<=ACCOUNTING_DT AND END_DT>=ACCOUNTING_DT.
When i just joins ACCOUNTING_DT from my stage to BEGIN_DT and END_DT in lookup it uses "=" (i believe).
Please tell me how to apply user defined criteria, othewise what is the procedure to achieve the same.

Thanks,
Sreenivas
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You can't. Hashed lookups are equi-joins.

There are several alternatives for you, try searching the forum for range lookup and many conversations on the topic will be revealed.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply