Query Flaw???

B

Bob Barnes

I need only one value from an aggregate Query - TheStores, which means the
Number of Inspections in a "From - To" Timeframe.

I use that as part of a calculation. The "Inspections" table contains only
a Store and an InspectionDate.

It gives me the result I need...but no Join...the Query has several other
Fields from "Randy_F_FindFreq", but has been trimmed as an example here.

SELECT Randy_F_FindFreq.AAll, Randy_Insp.TheStores,
Round([AAll]/[TheStores],4) AS PerAll
FROM Randy_F_FindFreq, Randy_Insp;

Is this "sound"?

TIA - Bob
 
L

Lynn Trapp

Without a join your results will be skewed -- even more so as the tables
grow. As it is your query will produce a "Cartesian product," which results
in the multiplication of the number of rows in the first table by the number
of rows in the second table.
 
B

Bob Barnes

As it is your query will produce a "Cartesian product," which results
in the multiplication of the number of rows in the first table by the number
of rows in the second table.

Lynn - I understand "Cartesian product", but the "non-joined" Table will
always be One Field, one row. It appears to work very well for what I
needed. But, I'm looking for reasons it could fail...With one Field, one
record, it "can't fail"???

TIA - Bob

Lynn Trapp said:
Without a join your results will be skewed -- even more so as the tables
grow. As it is your query will produce a "Cartesian product," which results
in the multiplication of the number of rows in the first table by the number
of rows in the second table.

--

Lynn Trapp
Microsoft MVP (Access)
www.ltcomputerdesigns.com


Bob Barnes said:
I need only one value from an aggregate Query - TheStores, which means the
Number of Inspections in a "From - To" Timeframe.

I use that as part of a calculation. The "Inspections" table contains
only
a Store and an InspectionDate.

It gives me the result I need...but no Join...the Query has several other
Fields from "Randy_F_FindFreq", but has been trimmed as an example here.

SELECT Randy_F_FindFreq.AAll, Randy_Insp.TheStores,
Round([AAll]/[TheStores],4) AS PerAll
FROM Randy_F_FindFreq, Randy_Insp;

Is this "sound"?

TIA - Bob
 
Top