WHERE '#TodaysDate#' <= '#EndDate#' and '#ShowDate#' <= '#TodaysDate#' or
'#ShowDate#' = "NoExp"
If you are using NoExp as a variable, then it needs pound signs around it
and single quotes too.
-----Original Message-----
From: Jason Larson [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 08, 2000 10:25 AM
To: [EMAIL PROTECTED]
Subject: CF Newbie and Syntax Error
Wondering if someone can help a Newbie out on when to use double quotes and
single quotes? Here's my problem, I am trying to call info from a Access
Database from two different text fields (EndDate, and ShowDate), into a Sql
statement. Here's the code.
<cfset TodaysDate=DateFormat(Now(), "mm/dd/yyyy")>
<cfquery name="coupons" datasource="bmiMain">
SELECT *
FROM Coupons
WHERE "TodaysDate" LTE "EndDate" and "ShowDate" LTE "TodaysDate" or
"ShowDate" EQ "NoExp"
</cfquery>
When I try running the code, it gives me a syntax error. Your help would be
much appreciated.
Thanks
Jason Larson
[EMAIL PROTECTED]
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.