deepatpaul
Programmer
I'm trying to use aliases for a query-of-query, and I'm getting a error that I presume tells me I can only perform a q-of-q against the original recordset, and nothing more. Here's my code:
<cfquery name="qSearch" dbtype="query">
SELECT s.*, l.locationName
FROM qInitialSearch s, tblLocations l
WHERE s.workshopCounty = l.locationID
ORDER BY l.locationName ASC,
s.workshopCity ASC,
s.workshopType ASC,
substring(s.workshopStart,7,4) DESC,
substring(s.workshopStart,4,2) DESC,
substring(s.workshopStart,1,2) DESC
</cfquery>
And this is the error I get:
Query Of Queries syntax error.
Encountered "s" at line 0, column 0.
The query it's calling from is relevant, unless I'm missing an obvious piece of syntax here.
<cfquery name="qSearch" dbtype="query">
SELECT s.*, l.locationName
FROM qInitialSearch s, tblLocations l
WHERE s.workshopCounty = l.locationID
ORDER BY l.locationName ASC,
s.workshopCity ASC,
s.workshopType ASC,
substring(s.workshopStart,7,4) DESC,
substring(s.workshopStart,4,2) DESC,
substring(s.workshopStart,1,2) DESC
</cfquery>
And this is the error I get:
Query Of Queries syntax error.
Encountered "s" at line 0, column 0.
The query it's calling from is relevant, unless I'm missing an obvious piece of syntax here.