Connecting Tech Pros Worldwide Help | Site Map

count

G
Guest
 
Posts: n/a
#1: Nov 12 '05
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.


Doug M
Guest
 
Posts: n/a
#2: Nov 12 '05

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



Closed Thread