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

Enter Parameter Value

Status
Not open for further replies.

sharkchaser

Technical User
Mar 19, 2010
50
US
If I pull out the WHERE clause this works well.

What I need is to filter by the WHERE clause and ORDER BY Volume DESC.


SELECT listofficename, sum(closeprice) AS VOLUME
FROM tblCARETSdata
WHERE Volume > '10000'
GROUP BY listofficename ;

I'm trying to figure this out from "Simply SQL" but I'm missing something here.

Thanks.

Rick
 



Hi,

is Volume a TEXT field??? I'd wager NOT!
Code:
WHERE  Volume >  10000


Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Volume can't be resolved in the Access query. Try:
Code:
SELECT listofficename, sum(closeprice) AS VOLUME
FROM tblCARETSdata
GROUP BY listofficename  
Having  sum(closeprice) >  10000;


Duane
Hook'D on Access
MS Access MVP
 
And for the sort:
Code:
SELECT listofficename, Sum(closeprice) AS VOLUME
FROM tblCARETSdata
GROUP BY listofficename  
HAVING Sum(closeprice) > 10000
ORDER BY 2 DESC

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top