Re: ACE syntax question
Posted in 2000
You _could_ do something like: IF field1 MATCHES "[abc]" but this only really works if you're testing for a single character. A lookup table is definitely the way to go. It also allows you change your 50 odd values without recompiling all your reports. >>> Jonathan Leffler <jleffler@earthlink.net> 04/01/00 06:29am >>> jblatz@worldnet.att.net wrote: > I need to have an 'IF' statement in my ACE report that looks something > like: > > if field1 = "a" > or field1 = "b" > or field1 = "c" > . > . > . > > I have about 50 values to test. What I'd like to do is something like: > > if field1 in ("a","b","c"......) - but this is not accepted syntax in > ACE. > > Does anyone know how to test for multiple values of a character field > without having to code a line for each? There isn't a direct alternative. About the only thing that might work is to create a lookup table which lists the values in a group and use the group ID in the IF statement instead of the values. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v1.00.PC1 -- see http://www.perl.com/CPAN #include <disclaimer.h>