6 Replies Latest reply on Nov 17, 2012 2:45 AM by BKBK

    Query of queries and dates


      I converted some XML into a query (just two columns - a date and description).  If I cfdump my query, I get the following:


      abc{ts '2012-11-05 00:00:00'}
      cde{ts '2012-11-06 00:00:00'}
      efg{ts '2012-12-04 00:00:00'}
      ghi{ts '2012-12-01 00:00:00'}


      What I want to do now is just a simple query to get the records with a date >= today's date.


      <cfquery name="datetest" dbType="query">

      SELECT *

      FROM myquery

      WHERE theDate >= now()



      This of course does not work.  When I created the original query represented by the table above, I did:


      <cfset myquery = QueryNew("theDate, description", "date, varchar")>


      I'm hoping this is just a simple syntax issue, but I really need to be able to do date comparison in my query of a query.  Any help?