Skip to main content
Inspiring
October 8, 2008
Question

Query Of Queries syntax error--DATES

  • October 8, 2008
  • 3 replies
  • 666 views
I have a main query that selects all of the needed data including a column of dates.

But when I query the main query (Q of Q) I get a syntax error because of the date.

How can I query on the date using Q of Q?

Do I need to format the date differently?
    This topic has been closed for replies.

    3 replies

    October 8, 2008
    There are syntax restrictions. One thing I have been caught on is having a database field called 'date'. It's easy enough to get around - in your select, give a pseudonym for the date field - so instead of 'select date from mytable', it would be 'select date as theDate from mytable'. Then you would reference the field as theDate in your query of queries.
    Inspiring
    October 8, 2008
    Don't format the date at all for starters. If you are trying to use a cold fusion variable in your q of q, make sure it is a date or datetime object.
    October 8, 2008
    Can you post your error or query?