Hey all,
I'm trying to do this with a single SQL statement.
Delete all records from the table tblEvents that are older than 7 days.
:)
This is the code I tried using:
<CFQUERY name="DE" Datasource="#DSN#">
Select * FROM tblEvents
WHERE Now() - estarttime >= 7
</CFQUERY>
<CFDUMP var="#DE#">
<CFQUERY name="DE2" Datasource="#DSN#">
Select * FROM tblEvents
WHERE #DateDiff('dd',Now(),estarttime)# GTE 7
</CFQUERY>
<CFDUMP VAR="#DE2#">
The first query works fine...the second one throws an error:
"Error Diagnostic Information
An error occurred while evaluating the expression:
#DateDiff('dd',Now(),estarttime)#
Error near line 19, column 9.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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