I have a series of almost identical queries that I would like to put into a qdf with parameters.
I have used these in the past but my knowledge of SQL is not up to the complexity of this .
A variant of the query shown is used as input for a bevy of count queries.
There is also a set of append queries with similar parameters.
The basic premise is that 8 tables are scanned for instances of a particular error. The results are applied to a menu.
The menu selection then determines which of the tables will be worked on. So with 8 tables and 3 queries for each table, things start to get out of hand, hence the call for qdf help
The basic query is not the problem, it is the criteria and the use of a second and third joined tables as part of the criteria
A sample query is listed below, can it be implemented as a qdf with parameters.
The "Main" table name is the only part of the query that needs to be parameterised.
There are 8 tables that use a variation of this query. Is it worth creating a qdf or do I stay with multiple queries?
The SQL below is created from the query design window.
I have used these in the past but my knowledge of SQL is not up to the complexity of this .
A variant of the query shown is used as input for a bevy of count queries.
There is also a set of append queries with similar parameters.
The basic premise is that 8 tables are scanned for instances of a particular error. The results are applied to a menu.
The menu selection then determines which of the tables will be worked on. So with 8 tables and 3 queries for each table, things start to get out of hand, hence the call for qdf help
The basic query is not the problem, it is the criteria and the use of a second and third joined tables as part of the criteria
A sample query is listed below, can it be implemented as a qdf with parameters.
The "Main" table name is the only part of the query that needs to be parameterised.
There are 8 tables that use a variation of this query. Is it worth creating a qdf or do I stay with multiple queries?
The SQL below is created from the query design window.
Code:
SELECT Main.Family, Main.Genus, Taxon.genus, Bad_Family.Family
FROM (Main LEFT JOIN Taxon ON Main.Family = Taxon.family) LEFT JOIN Bad_Family ON Main.Family = Bad_Family.Family
GROUP BY Main.Family, Main.Genus, Taxon.genus, Bad_Family.Family
HAVING (((Taxon.genus) Is Null) AND ((Bad_Family.Family) Is Null))
ORDER BY Main.Genus;