Try this:
where AccountCreationDate = '#form.month#-#form.day#-#form.year#'
I think all you're really missing is single quotes (though I may be wrong
about that) but it seems to me it's more intuitive and less
processor-intensive to do a simple concatination than to break up a date
object.
--Ben Doom
Programmer & General Lackey
Moonbow Software
: -----Original Message-----
: From: Rick Faircloth [mailto:[EMAIL PROTECTED]]
: Sent: Wednesday, December 18, 2002 10:41 PM
: To: CF-Talk
: Subject: How can I modify this query so mySQL will be happy?
:
:
: This worked with MS Access, but I'm getting an error with this now...
:
: <CFQUERY Name="GetClients" Datasource="#DSN#">
:
: Select ClientID from clients C
:
: where Day(AccountCreationDate) = #Form.Day#
: and Month(AccountCreationDate) = #Form.Month#
: and Year(AccountCreationDate) = #Form.Year#
:
: </CFQUERY>
:
: Here's the error:
:
: [TCX][MyODBC]You have an error in your SQL syntax.
: Check the manual that corresponds to your MySQL server version
: for the right syntax to use near '(AccountCreationDate) = 18 and
: Month(AccountCreationDa
:
:
:
: The error occurred while processing an element with a general
: identifier of
: (CFQUERY),
: occupying document position (34:218) to (34:263).
:
: Thanks!
:
: Rick
:
:
:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.