I don't know if ORACLE has this function or not but instead of datepart, try
month(columname) = '#month#'

I use that in my queries on SQL 2k and it works like a charm. Hopefully
that'll help.

J.

John Wilker
Web Applications Consultant
Allaire Certified ColdFusion Developer

Office: 909-943-8428
www.red-omega.com <http://www.billtracker.org>

15 people are known to have been crushed to death tilting soda
machines towards them in order to receive free soda.


-----Original Message-----
From: Francis, Jennifer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 1:59 PM
To: CF-Talk
Subject: Datepart question



I have the following query:

<cfquery name="callist" datasource="ncc" blockfactor="50">
select id, priority, category, projectname, developer, description,
comments, estcompdate
from devproject
where estcompdate neq 'none'
AND status is null
OR status='none'
and  datepart(mm, estcompdate)='#month#'
union
select id, newicon, updicon, projectname, developer, projectdescription,
status, comments
from calendar
where status='Closed'
and impact <> 'No'
and developer in (select lastname from tbldevlogon where mgr='K')
and datepart(mm, lastupdate)='#month#'
</cfquery>

It worked just fine until I added the "datepart" section.  Now it's
returning :
Oracle Error Code = 920
ORA-00920: invalid relational operator
Am I missing something?  Please help!!!

TIA,
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to