CF Newbie and Syntax Error

2000-05-08 Thread Jason Larson


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/")

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=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: CF Newbie and Syntax Error

2000-05-08 Thread Tim Cavins

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/")

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=listsbody=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=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: CF Newbie and Syntax Error

2000-05-08 Thread Fred T. Sanders

No quotes or #s around actual table column names as well.

Fred

- Original Message -
From: "Tim Cavins" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 08, 2000 9:32 AM
Subject: RE: CF Newbie and Syntax Error


 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/")

 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=listsbody=li
sts/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=listsbody=li
sts/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=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.