Connecting Tech Pros Worldwide Help | Site Map

count

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 02:33 PM
G
Guest
 
Posts: n/a
Default count

I need to be able to count accounts as they are entered by operators. Each
account number has fields such as "Statements req date" and "Application req
date".
I would like the database to count each account number once the "Statements
req date" and "Application req date" are populated.
Note: both of these two fields could be populated with a date for the one
account. If this happens, then I don't want the database to count this
account entry as 2 but rather as 1.
How could i do this in a query?
I want to be able to reach the number 50 so that I could get a message that
50 has been reached then reset the number back to zero.



  #2  
Old November 12th, 2005, 02:35 PM
Doug M
Guest
 
Posts: n/a
Default Re: count


"G" <sky5@optusnet.com.au> wrote in message
news:3f951115$0$3699$afc38c87@news.optusnet.com.au ...[color=blue]
> I need to be able to count accounts as they are entered by operators. Each
> account number has fields such as "Statements req date" and "Application[/color]
req[color=blue]
> date".
> I would like the database to count each account number once the[/color]
"Statements[color=blue]
> req date" and "Application req date" are populated.
> Note: both of these two fields could be populated with a date for the one
> account. If this happens, then I don't want the database to count this
> account entry as 2 but rather as 1.
> How could i do this in a query?
> I want to be able to reach the number 50 so that I could get a message[/color]
that[color=blue]
> 50 has been reached then reset the number back to zero.
>
>[/color]

SELECT Sum(Abs(IsDate([statmtReqDate]) Or IsDate([acctReqDate]))) AS HasDate
FROM tblAccount;

where statmtReqDate and acctReqDate are your two date/time fields with
return a sum of accounts where either or both date is set. If the same
account number is in two records it will be counted twice if they both have
a date.

Doug Munich
doug@munich.ca



 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.