I have a hash table that has a composite key (the key is composed of 2 columns c1 and c2)
I want to specify a lookup conidtion like this:
C1 = value1 and (C2=Value3 or Value4)
The first part is trivial.
The part 'and (C2=Value3 or Value4)' is where I have a problem
I assume that the logical operator 'and' goes by default, when I specify
C2=Value3 or C2=Value4 I get no syntax error but the row is not found even though it exists.
Any suggestions? Thanks.
ekareem
Hash table lookup with boolean condition
Moderators: chulett, rschirm, roy
I suppose you have specified like
'Value3' or 'Value4'
in the lookup condition for column 2.
Actually it is a logical condition which results into true (1) or false(0).
What is actually happening is like its trying to match
Col2 with either 0 or 1 (which you don't want).
For your case you would need two separate lookups.
In first you will specify
C1='Value1'
C2='Value3'
In the second you will specify
C1='Value1'
C2='Value4'
Hope this will help you.
'Value3' or 'Value4'
in the lookup condition for column 2.
Actually it is a logical condition which results into true (1) or false(0).
What is actually happening is like its trying to match
Col2 with either 0 or 1 (which you don't want).
For your case you would need two separate lookups.
In first you will specify
C1='Value1'
C2='Value3'
In the second you will specify
C1='Value1'
C2='Value4'
Hope this will help you.