Query for multiple values
Posted: Fri Jul 09, 2004 10:31 am
Okay, this is admittedly a bad design, but the application was totally unforseen.
Lets say we have 3000 records and we need to query for records with two fields containing any one of an unknown but substantial number of pairs of non-contiguous integer values, for the sake of discussion lets say 20 to as many as 40.
That is "WHERE Cref=80 AND Seq=9" for instance.
One would really like to avoid 20-40 queries, or one query with 20-40 "OR" clauses in it, but is there any way to do that? Something like matching against an array?

Lets say we have 3000 records and we need to query for records with two fields containing any one of an unknown but substantial number of pairs of non-contiguous integer values, for the sake of discussion lets say 20 to as many as 40.
That is "WHERE Cref=80 AND Seq=9" for instance.
One would really like to avoid 20-40 queries, or one query with 20-40 "OR" clauses in it, but is there any way to do that? Something like matching against an array?