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
