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

Lowest order of items in a chart 1

Status
Not open for further replies.

irethedo

Technical User
Feb 8, 2005
429
US
I have a report that contains a chart of items that I would like to display the lowest number of each but I would also like to not display any items that equal zero.

The following works but it displays items that equal zero first:


SELECT TOP 10 ([item]) AS Expr1, (Count([item])) AS [My items] FROM [my qry] GROUP BY [my qry].item ORDER BY Count([item]);


How can I not display the items that equal zero?

Thanks
 
Try this. See if it helps.


SELECT TOP 10 ([item]) AS Expr1, (Count([item])) AS [My items] FROM [my qry]
WHERE (Count(Item)) > 0
GROUP BY [my qry].item ORDER BY Count([item]);


Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top