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.
The error occurred in
C:\CFusionMX7\Approvals\GetApproval.cfm: line 137
136 : <CFQUERY NAME="subapprovals" dbtype="QUERY">
137 : #Subselect#
139 : </CFQUERY>
SELECT ApprovalNumber, Description, Approval_type,
Date_Received, Date_Released FROM approvals WHERE Approval_type =
''CAO'' ORDER BY ApprovalNumber DESC