Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

queries

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I need some help with queries.I have a table with a whole bunch of data in it.I have several queries that pull subsets of that data, but the subsets do not overlap(i.e. no one record is in more than one query).Also, the queries do not pull records that are in consecutive blocks (i.e. rows 50-60).Now I need a query to retrieve all of the records that are not retrieved by the other queries, how do I do that?Thanks for any help.

Clayton
 
in the criteria field where before you had equality statements use combine all of the previous queries equality statements into one big non- equality statement. For exampley if you had two queries one finding those less than 4 and one find those greater than 7 the criteria in each would be
< 4
> 7
for the third query that is those records not retrieved
not( < 4) and not (>7)


Walt III
SAElukewl@netscape.net
 
Yeah, I'm doing that now, but I've got about 10 or 15 other queries that each have multiple criteria and each time I add or change one it becomes a mess to keep everything updated. Thanks for the response,though.

Anybody else?

Clayton
 
if you could somehow put your criteria into a table somewhere that way each time you ran the query you could get the information from one source. That way if you update one query's criteria then you will automatically update the criteria everywhere it is used.

For example You have a table called QueriesTable
with three columns
one for the query name
one for the query criteria
and one for query description
then when you want to update a query use a subroutine to get the information on what query to update and what criteria to use. Just something that Came to mind.

Walt III
SAElukewl@netscape.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top