BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SQL count with MS-Access MDB

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
CC
Guest





PostPosted: Mon Jul 04, 2005 10:12 pm    Post subject: SQL count with MS-Access MDB Reply with quote



Hello!

I have a table that contains work orders, like this:

WorkOrderID
DateCompleted
TechnicianID

Each technician works non-specific days, that is, in a 14 day period a
technician can work anywhere from 0 to 14 days.

Here is the problem:

I can get a SQL statement like this:

select count(DateCompleted) as DaysWorked, TechnicianID,
DateCompleted...

The problem is that a tech may do 15 calls in 1 day. The count above
would return 15 for 1 day (as it counts the days non-uniquely instead
of it coming up with 1.

PS select count(distinct DateCompleted) does not work with MDB files.

Thanks.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.