Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 18th, 2004, 04:16 PM
Authorized User
 
Join Date: Jun 2004
Location: , , .
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Raif
Default query count?

Hi, I have a table with fields date, slot1, slot2, and slot3. but to simplify lets just say it has date and slot1. each day has five records and the possiblity of 5 different names. so for 1/1/2000 there are five records which may or may not have a name in the slot field. I set up a query with group by date, and count under slot1. It groups by date fine but if I have only one entry in the slot1 the I get 1/1/2000 6. If all five have names in them then I get 1/1/2000 30. I don't know where it's getting those numbers but obviously what I want is 1/1/2000 1 or 1/1/2000 5. Then in the real query I would like to have that for all 3 slots. and Ultimatly and to the exclustion of all the rest what I want is just a total of all the slots that are filled by date so if under slot1 I have two names and slot2 I have records with names and slot3 I have all five then I would get a result of 1/1/2000 10.
Anyway, any help would be appreaciated.
Thanks
Raif

  #2 (permalink)  
Old June 18th, 2004, 05:08 PM
Authorized User
 
Join Date: Jun 2004
Location: , , .
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Raif
Default

Right, So I swear to god I just left it alone for a while and then recreated the query and it works just fine. The only difference is that in the first query I had a couple other tables showing ( but not using ) because I was concidering useing them.
Well alls well that ends well I guess
Thanks
Raif



Similar Threads
Thread Thread Starter Forum Replies Last Post
Count of same column appearing twice in same query andy151982 SQL Server 2000 1 May 14th, 2007 03:17 PM
new display count query carswelljr SQL Language 9 May 7th, 2007 04:59 PM
count clause in query mateenmohd SQL Server 2000 2 June 10th, 2004 01:47 AM
SQL query for count programmer_kay ADO.NET 1 April 18th, 2004 02:48 AM
SQL query for count programmer_kay SQL Language 1 April 17th, 2004 07:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.