Defining records at runtime
Thu Apr 6 09:01:00 CEST 2006
> I get around that by finding the index of Attr and doing
> 'element(Index, P) == MatchVal' instead.
Be careful to use =:=/2 rather than ==/2, or QLC will scan the whole
table even if Index is the key position or there is an index on
Use ==/2 only if you want comparison rather than matching.
For example, "2.0 == 2" is true, but "2.0 =:= 2" is false.
Hans Bolinder, Erlang/OTP
More information about the erlang-questions