B
Benton
I'd like to incorporate this SQL statement into my main query as a
subquery:Here's the statement. (Select Avg(Average) fromQAVERAGE).With this
statement i'd like to create a field on my QBE grid that would calculate the
average of the below fields(i.e 200407,200408....) Is this gonna work
SELECT DISTINCT Health_Prod1.Broker, Health_Prod1.EffMonth,
Sum(Health_Prod1.[200407]) AS SumOf200407, Sum(Health_Prod1.[200408]) AS
SumOf200408, Sum(Health_Prod1.[200409]) AS SumOf200409,
Sum(Health_Prod1.[200410]) AS SumOf200410
FROM Health_Prod1
GROUP BY Health_Prod1.Broker, Health_Prod1.EffMonth;
Here's a sample of my query results
Broker EffMonth 200407 200408 200409 200410 average
100 01/09/2003 0 0 0
294 01/07/2004 6984 0 0 0
100 01/09/2004 0 0 7164 0
100 01/10/2004 0 0 0 348
subquery:Here's the statement. (Select Avg(Average) fromQAVERAGE).With this
statement i'd like to create a field on my QBE grid that would calculate the
average of the below fields(i.e 200407,200408....) Is this gonna work
SELECT DISTINCT Health_Prod1.Broker, Health_Prod1.EffMonth,
Sum(Health_Prod1.[200407]) AS SumOf200407, Sum(Health_Prod1.[200408]) AS
SumOf200408, Sum(Health_Prod1.[200409]) AS SumOf200409,
Sum(Health_Prod1.[200410]) AS SumOf200410
FROM Health_Prod1
GROUP BY Health_Prod1.Broker, Health_Prod1.EffMonth;
Here's a sample of my query results
Broker EffMonth 200407 200408 200409 200410 average
100 01/09/2003 0 0 0
294 01/07/2004 6984 0 0 0
100 01/09/2004 0 0 7164 0
100 01/10/2004 0 0 0 348