SELECT count(*) AS total_count
FROM table1
WHERE searchdate > #CreateODBCDateTime(DateAdd("d", -7, Now()))# AND
searchdate <= #today#
Order By searchtext
Terry Fielder
Network Engineer
Great Gulf Homes / Ashton Woods Homes
[EMAIL PROTECTED]
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of [EMAIL PROTECTED]
> Sent: Friday, May 31, 2002 12:20 PM
> To: [EMAIL PROTECTED]
> Subject: [CFTALKTor] count multiple occurrences
>
>
> Hi folks,
>
> In my database I have stored some search parameters named searchtext,
>
> what I want to do is to be able to count how many times that
> a particular
> text (record) has been entered.
>
> So rather than display the searchtext result of "dave" 10
> times it would
> display once with the count variable of 10.
>
> my current query to get my data is:
>
> SELECT searchtext,searchdate
> FROM table1
> WHERE searchdate > #CreateODBCDateTime(DateAdd("d", -7, Now()))# AND
> searchdate <= #today#
> Order By searchtext
>
> Is there an efficient (easy) way to go about this using sql?
>
> I was thinking of maybe using a trigger to check if the text
> exists and then
> add to a counter but have never used triggers before.
>
> Any thoughts on how this could be handled..
>
>
>
> Dave Seddon (p) 997-1803
> Internet Software Support Specialist
> Workplace Information Directorate, HRDC-DRHC
> e-mail: [EMAIL PROTECTED]
> Web: http://labour.hrdc-drhc.gc.ca
>
> -
> You are subscribed to the CFUGToronto CFTALK ListSRV.
> This message has been posted by: [EMAIL PROTECTED]
> To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
> Manager: Kevin Towes ([EMAIL PROTECTED])
http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)
-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: [EMAIL PROTECTED]
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)