Dont you need quotes around the comparison date ? And is "MON" a valid month
argument ?
<cfset comparisondate = #dateformat(now() - 7, 'DD-MMM-YY')#>
<cfquery name="accepted_ideas" datasource="CF_3IS">
SELECT SUG_SUGGESTIONS.SUGGESTION_ID,
SUG_SUGGESTIONS.SUGGESTION_NAME,
SUG_SUGGESTIONS.STATUS_CODE,
SUG_SUGGESTIONS.STATUS_DATE,
SUG_SUGGESTIONS.PRIMARY_SUGGESTOR_USERID,
SUG_SUGGESTIONS.EVAL_DISPOSITION,
SUG_SUGGESTIONS.SAVINGS_TOTAL_AMOUNT,
SUG_MORE_SUGGESTORS.SUGGESTOR_USERID
FROM CF_3IS.SUG_SUGGESTIONS, CF_3IS.SUG_MORE_SUGGESTORS
WHERE SUG_SUGGESTIONS.STATUS_CODE= 'C'
AND SUG_SUGGESTIONS.EVAL_DISPOSITION = 'A'
AND TO_CHAR(SUG_SUGGESTIONS.STATUS_DATE, 'DD-MON-YY') <=
#variables.comparisondate#
AND SUG_SUGGESTIONS.SUGGESTION_ID =
SUG_MORE_SUGGESTORS.SUGGESTION_ID
</cfquery>
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists