> Quoting Raymond Camden <[EMAIL PROTECTED]>:
> >
> > Are you using CFMX? I believe this issue relates to the fact that
> > QofQ makes assumptions based on the data in the original query. In
> > your data below - your first row in the column custom 1 has a data.
>
> "April 2002" is not a date, it is a string. A date in SQL has the
> format yyyy-mm-dd. It can not even be the string representation of a
> date, because it only has a month and a year.
However - CFMX make assumptions based on the string. The following code
shows how QofQ can assume April 2002 is a date and correctly query
against it:
<cf_querysim name="test">
col1 col2
April 2002 ray
May 2002 camden
January 2002 foo
</cf_querysim>
<cfquery name="test2" dbtype="query">
select *
from test
where col1 < <cfqueryparam value="April 2002"
cfsqltype="CF_SQL_DATE">
</cfquery>
<cfdump var="#test2#">
> BTW, why should CF MX make an assumption for that in the first place?
> Databases are strongly typed. Java is strongly typed. Unless that
> information is not returned through JDBC, CF MX only needs to make an
> assumption about the "-100", not about what is returned from the
> databse. Or am I misunderstanding something here?
Let me check on this - I don't know if QofQ uses the metadata from the
original query or not. Certainly for a 'man-made' query like te one
above, it made the assumption that col1 was a data column.
=======================================================================
Raymond Camden, ColdFusion Jedi Master for Hire
Email : [EMAIL PROTECTED]
Yahoo IM : cfjedimaster
"My ally is the Force, and a powerful ally it is." - Yoda
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists