In SQL datepart function, you don't need quotes around the "datepart"
argument, and since it's a numeric value, you don't need quotes around
#month#.
-----Original Message-----
From: Francis, Jennifer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 3:12 PM
To: CF-Talk
Subject: Newbie question - query by month
I have a date field (completedate) stored in my database. I want to be able
to pull out all of the records by a selected month for a month-end report.
Is there an easy way of doing this? I've tried
where datepart('m', completedate)='#month#'
but I keep getting an "invalid column name" error.
Any help would be MUCH appreciated...
Jennifer Francis
AT&T Wireless
Training Development & Design
[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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