i have a query of queries in coldfusion and i want to limit the results to a particular quantity.
ive read you can use
SELECT TOP 10 * FROM myTable ...
and that works for me in a query, but blows up when i try it in a query of queries for some reason. heres the code
<cfquery name="sortDistance" dbtype="query">
SELECT top 10 * from joinTables WHERE distance < #radius#
ORDER BY distance
</cfquery>
can anybody suggest an alternative way of achieving the same result? id like to limit the size of the query result itself and not simply display only part of the records.
thanks!
ive read you can use
SELECT TOP 10 * FROM myTable ...
and that works for me in a query, but blows up when i try it in a query of queries for some reason. heres the code
<cfquery name="sortDistance" dbtype="query">
SELECT top 10 * from joinTables WHERE distance < #radius#
ORDER BY distance
</cfquery>
can anybody suggest an alternative way of achieving the same result? id like to limit the size of the query result itself and not simply display only part of the records.
thanks!