Hi all,
Maybe someone can help answer this question. Is it possible to return data from a Hash File where the keys are equal except the date where it is less than or equal to the date of the source? Or is my only solution to use bind variables and use user defined sql?
Thanks
Hash Lookups and Transformers
Moderators: chulett, rschirm, roy
Is this date field part of the key? If no, then you can certainly do it by setting a constraint in a stage variable.
Something like
Something like
Code: Select all
IF NOT(REF.NOTFOUND) AND ref.DATE <= src.DATE then @TRUE else @FALSE
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: Hash Lookups and Transformers
Not using a Hashed File stage.jpr196 wrote:Hi all,
Maybe someone can help answer this question. Is it possible to return data from a Hash File where the keys are equal except the date where it is less than or equal to the date of the source? Or is my only solution to use bind variables and use user defined sql?
Thanks
Hashed File stage does not access the hashed file using SQL; instead it applies an algorithm to the exact key value. From that function it obtains the address of the record in question, and can retrieve it directly. This is very fast.
You can use SQL to access the contents of a hashed file if you use a UniVerse stage. Without any indexes on the hashed file, this promises to be very slow, particularly for other than "=" as your lookup condition.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: