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

Referring to a field and using an aggregate function in 1 sql

Status
Not open for further replies.

Ciarak

Programmer
Oct 17, 2001
9
GB
Hi,
when I try to query the database using the query "SELECT Refdes,Avg(Area),Stdev(Area)From RefdesResults",I get the following error "You tried to execute a query that does not include the specified expression as part of an aggregate function or grouping".Preumbly this means that if I use an aggregate function such as Avg then my recordset can't also return a field such as Refdes.Is there a way around this.

 
Is the 'Refdes' field listed in your GROUP BY clause ?
The SQL syntax should operate if it is included.
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top