Hi,
In my seqfile One field value is '000'and in my lookuphash file field value is '0'. SO when it is trying to lookup. it will fail.
How to solve this problem.
any help would be appreciated.
TIA
LookUp fails
Moderators: chulett, rschirm, roy
I think you mean in the key expression where you do the lookup use:gpatton wrote:to field in seq file use
(linkname.seq_field_name + 1 - 1)
this will convert it to 0 which will then match with the lookup
Code: Select all
linkname.seq_field_name + 0
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Note the change Ken made to the key expression logic. Any kind of 'math' on the field will (in essence) convert it to a number. So do something that you know won't change the value of the field - like adding zero to it - rather than adding and subtracting 1 from the value.
Both work and illustrate the point, the zero is 'safer' and fewer operations.
Both work and illustrate the point, the zero is 'safer' and fewer operations.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers