Large Criteria

  • Thread starter Thread starter snax500
  • Start date Start date
S

snax500

How do I make a query whan there is a large amount of criteria? Do I
make many small queries and try to join them in a query or do I make
one query with a large amount of criteria. Just want to know a
strategy.

Thanks
 
It really depends on what you mean by "many".

If I need to test for a list of 25 cities out of a file with zillions of
cities, then I would simply build a neat prompt form and build a table
called.

tblAskCities

field:City

The user could then "build up" this list of cities that we want to mail to
(for sample).

Then, you make the query take its criteria FROM the above table.

eg:

select * from tblcustomers where city in (select city from tblAskCites)

That way, I can feed the query 10, or 500 cites with great ease. And, even
better is that I don't even have to open the query builder to add new cites.
We can build a nic econtiues form in which we type in (and mantain) a list
of cites we mail to.

And, you could use the roignal large customer file to popular this list of
cities. Then, we would not even have to type in the citeis, but just check
box which cities we want. Thus, we would add a check mark column. Then, you
can display the list of cities...and check box column. The above query then
becomes

select * from tblcustomers where city in
(select city from tblAskCites with mailto = True)
 
Back
Top