Walter Meester
HoogkarspelNetherlands
General information
Category:
Coding, syntax & commands
>>Nick,
>>
>>>>at least look semi-sane and extensible? (INLIST() can only have up to 24 values, it is not optimizable, but it's infinitely better than the original)
>>
>>>Or:
>>>
>>>IIF(alltrim(t.transs) $ "~CS~DV~L~R~RC~RD~V~ST~OP~", 1, -1)
>>>this one is not limited to 24 values.
>>>
>>>(You may use IIF("~" + alltrim(t.transs) + "~" $... so it does not mix up R and RC and RD codes). You would not need alltrim() if all codes could be 2 char in length (along with the code field).
>>
>>your solution is not optimizable, INLIST is (As opposed as Ed suggested), so INLIST would be prefferable.
>>
>
>Or do it the way I came up with so it's readable, optimizable, extensible and not limited to 24 items.
I agree this is probably the best way, but I think it could have a performance penalty because now you have to deal with more than 1 table.
Walter,
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only