bytwo
06-30-03, 10:52 PM
as soon as I add the "Avg" function I get the error message below. If I remove the AVG I get just the first value from the first row. I'm trying
to retrieve the Top 3 records then average col1. Any help please?
SELECT DISTINCT TOP 3 Avg(col1) AS some_name, col2 FROM some_table WHERE col2 = '" & some_var & "' ORDER BY col2"
Microsoft JET Database Engine error '80040e21'
You tried to execute a query that does not include the specified expression 'userid' as part of an aggregate function.
to retrieve the Top 3 records then average col1. Any help please?
SELECT DISTINCT TOP 3 Avg(col1) AS some_name, col2 FROM some_table WHERE col2 = '" & some_var & "' ORDER BY col2"
Microsoft JET Database Engine error '80040e21'
You tried to execute a query that does not include the specified expression 'userid' as part of an aggregate function.