use the DB, its much more logical, there is no reason you couldn't pass the date into an sp using CF, but getting the DB to do the dirty work makes more sense than allowing CF to do it... especially of the system grows.
-----Original Message----- From: Gyrus [mailto:[EMAIL PROTECTED]] Sent: 14 January 2003 16:56 To: CF-Talk Subject: Re: Delete records older than a certain time frame ----- Original Message ----- From: "Ewok" <[EMAIL PROTECTED]> > <cfquery name="delold" datasource="#request.maindsn#" dbtype="ODBC"> > delete * from tbl_bb_newusers > where datejoined < #createodbcdatetime(dateadd("h", -24, now()))# > </cfquery> > > but do you know of a way to do exactly this with a sql statement alone, no > cf vars > > ...for an access db ---------------------------- Why no CF vars? I know it's a good idea in general to get the DB to handle all it can handle, but this works fine in Access, I can't imagine it causes any real problems through using a CF var. Gyrus [EMAIL PROTECTED] work: http://www.tengai.co.uk play: http://norlonto.net PGP key available ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

