macromedia.coldfusion.database_access
[Top] [All Lists]

Query output based on date - Oracle 8i

Subject: Query output based on date - Oracle 8i
From: "lazyvalet" <webforumsuser@xxxxxxxxxxxxxx>
Date: Thu, 27 Mar 2008 19:25:09 +0000 (UTC)
Newsgroups: macromedia.coldfusion.database_access

I am trying to write a very simple query to output data based on date ranges, 
but I keep encountering an error.

 When I do this statement:

 select * from my.table
 where startdate > '2008-01-01'

 I get this error:  

 [ODBC][Ora]ORA-01861: literal does not match format string


 When I format the select statement this way:

 select * from my.table
 where startdate > #2008-01-01#

 i get this error:  

 [ODBC][Ora]ORA-00932: inconsistent datatypes: expected DATE got NUMBER

 Currently using CF8, and what I believe is Oracle 8i.  I have tried formatting 
this data in many other ways, but can't get it to work.  I know that when I 
query the database via access, it has no problem returning results with the SQL 
date formatted like #01/01/2008#


<Prev in Thread] Current Thread [Next in Thread>