2 Replies Latest reply on Jul 17, 2007 8:32 AM by Rottie

    Query Of Queries syntax error

      I tried to query a query result based on user selected columns. I built the SQL SELECT statement, #SubSelect#, via <CFSET> based on the columns selected. I received following error, and I can't seem to see the cause.

      Error Executing Database Query.

      Query Of Queries syntax error.
      Encountered "CAO.

      The error occurred in C:\CFusionMX7\Approvals\GetApproval.cfm: line 137
      135 :
      136 : <CFQUERY NAME="subapprovals" dbtype="QUERY">
      137 : #Subselect#
      138 :
      139 : </CFQUERY>

      SELECT ApprovalNumber, Description, Approval_type, Date_Received, Date_Released FROM approvals WHERE Approval_type = ''CAO'' ORDER BY ApprovalNumber DESC