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

Convert query to access help

Status
Not open for further replies.

Bell1991

Programmer
Aug 20, 2003
386
US
I have the following query:

Select
txtName ,
sum(numPrice) as numTotalPrice
from tblProducts
Group by txtName

The error i am getting is: You tried to execute a query that does not include the specified expresseion 'txtName' as part of an aggregate function. It works great in ms sql server..

Any suggestions?

Thanks
 
if you use a group, then you have to make sure every one of your fields is also within a group...

so, you need to add:

...group by txtName, sum(numPrice)

--------------------
Procrastinate Now!
 
Oops, a little amendment, the grouping require you to group every calculated expression you have selected...

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top