View Single Post
  #1 (permalink)  
Old February 11th, 2004, 02:04 PM
Justine Justine is offline
Authorized User
Join Date: Jan 2004
Location: Frederick, MD, USA.
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default Simple query errors

This seems simple enough but I can't find where I'm going wrong.

I want to run a query that sums the number of hits for each type of site. The table has a type field and a hits field so all I need to do is sum them up and sort by type. But I'm getting the following error.

ADO error: Line 3: Incorrect Syntax near '100'.

Here is the sql for my query.

SELECT TOP 100 PERCENT Type, SUM(Type) AS CountofHits
FROM Web_Code08.tbl_counter

I haven't done much in Access 2002 so this might be just a simple error on my part. Any help would be appreciated.

Reply With Quote