Ryan,
You da man. Thanks! ;)

Terri


----Original Message Follows----
From: Ryan <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: CF-Talk <[EMAIL PROTECTED]>
Subject: Re: What's wrong with this query?
Date: Fri, 16 Feb 2001 08:38:08 -0600

Doesn't #variables.comparisondate# need to be quoted? I think it
might be trying to find a field called 16-Feb-01.

Ryan

At 14:26 2/16/01 -0000, you wrote:
 >Okay, I give up. Can someone take a peek at this query and tell me what's
 >wrong? I keep getting an Oracle error, "Invalid column name".
 >If I take the line out "AND TO_CHAR(SUG_SUGGESTIONS.STATUS_DATE,
 >'DD-MON-YY') <= #variables.comparisondate#" I have no problems. Oh, curse
 >these date problems! ;)
 >
 ><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>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to