Actually cfqueryparam can be used in QoQ queries... in which case you
can get a date comparison of your value and the value in the column by
using cfsqltype="cf_sql_timestamp" for instance. There are some
problems with QoQ on CFMX in that MX doesn't assume all the columns
are string values the way CF5 did and instead makes a "guess" about
the data type in the column based on the value in the first row. I
can't remember specific circumnstances offhand, but I know this has
been problematic for a few people who've had to produce workarounds.
Though CFMX does have the advantage of allowing you to use LCase() and
UCase() and I believe a few other functions against the name of the
column in a comparison clause which lets you get case-insensitive
comparisons whereas CF5 required the data to be uppercase or lowercase
when you created or populated the original query.

> Hey Ron,

> Dates are not strings, so even though CF is "typeless" and
> won't throw an
> error when you supply a quoted date for a query of this
> type, it will do a
> literal comparison, so if the format of the date in your
> "virtual table" and
> your query of that table are not literally identical, no
> matches will be
> returned.

> What you will likely want to do is leave out the quotes in
> your query.  If
> that doesn't work, you might try using DateFormat() around
> the values in
> your query, as well as when you create the values in your
> QueryNew() call.
> Remember, no quotes or else you'll be comparing the text
> description of the
> two dates.

> Hope this helps,

> Seth

>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Ron Mast
>> Sent: Monday, February 02, 2004 10:30 AM
>> To: [EMAIL PROTECTED]
>> Subject: is this a bug?
>>
>> Sorry that I'm asking a lot of questions today.:( I have
>> created a query using the queryNew() function, then I'm
>> querying that query like so:
>>                                 <CFQUERY NAME="q3"
>>                                 DBTYPE="query">
>>                                 SELECT *
>>                                 FROM    q2
>>                                 WHERE   PRT = '#YHSPRT#'
>>                                 AND
>> YR = '#thisyear#'
>>                                 </CFQUERY>
>>
>> But I don't get any record when there should be 1 when I
>> dump
>> the query above.
>>
>> I can dump the record when I hardcode PRT and the YR
>> value.
>>
>> Does anyone have a clue why?
>>
>> Ron
>>
>>

> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To unsubscribe:
>    Send UNSUBSCRIBE to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org



s. isaac dealey   214.823.9345

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.turnkey.to/ontap


-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To unsubscribe: 
   Send UNSUBSCRIBE to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to