Hllo everyone,

I've been trying to write a query to delete records older than 24 hours. I
can do it with a loop and a var, but I'm sure there is a way to do it with a
single query statement.

I have a field in the table that holds the date that the record was entered.
"DateJoined".

If i was using SQL server I could get it with something like...

<cfquery name=delold datasource="#request.maindsn#" dbtype="odbc">
 DELETE FROM tab
 WHERE DATEDIFF(h, datejoined, GETDATE()) > 24
</cfquery>

...or something similar .....i think

but I am trying to do it with an access db : (

any suggestions??


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to