Quantcast
Channel: Adobe Community : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 238792

Query of queries and dates

$
0
0

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

 



DescriptiontheDate
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()

</cfquery>

 

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?


Viewing all articles
Browse latest Browse all 238792

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>