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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query has different results according to Access Installation

Status
Not open for further replies.

AlisonEmmett

Technical User
Sep 8, 2000
15
0
0
GB
I am running the same database from two different Access Programs (both same version - 97). I have a query that uses two other joined queries to pull back data. In one version rows are returned, and not in the other. THIS MAKES NO SENSE TO ME !!!!


The SQL for the joining query is as follows:

SELECT StatQ1.Server, StatQ1.Time, Avg(StatQ1.StatBefore) AS AvgOfStatBefore, Avg(StatQ2.StatAfter) AS AvgOfStatAfter
FROM StatQ1 INNER JOIN StatQ2 ON (StatQ1.Server = StatQ2.Server) AND (StatQ1.Time = StatQ2.Time)
GROUP BY StatQ1.Server, StatQ1.Time;

STATQ1 is as follows:

SELECT Stats.Server, Stats.Time, Avg(Stats.Memory) AS StatBefore
FROM Stats
GROUP BY Stats.Server, Stats.Time, Stats.Date
HAVING (((Stats.Server)='julie1') AND ((Stats.Date)<#8/31/2000#));

STATQ2 is:
SELECT Stats.Server, Stats.Time, Avg(Stats.Memory) AS StatAfter
FROM Stats
GROUP BY Stats.Server, Stats.Time, Stats.Date
HAVING (((Stats.Server)='julie1') AND ((Stats.Date)>#8/31/2000#));




[sig][/sig]
 
When you are in a code window, if you click Tools, References are ther any difference in the ticked libraries? [sig]<p>Keith C Taylor<br><a href=mailto:TekTips@kctaylor.co.uk>TekTips@kctaylor.co.uk</a><br><a href= Information Gardener</a><br>The C stands for Computer![/sig]
 
Allison,

Also check the path statements for the database(s).

[sig]<p>MichaelRed<br><a href=mailto:mred@duvallgroup.com>mred@duvallgroup.com</a><br>There is never time to do it right but there is always time to do it over[/sig]
 
Tne path is def the same - will look into the references - I have managed to get round of it by making my final query a query of two tables rather than a query of two queries (if that makes any sense to you)

Thanks for all assistance [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top