<CF_QuerySort QUERY="MyQuery" SORTCOLUMN="MyColumn" SORTORDER="Desc" SORTTYPE="Numeric" SORTEDQUERY="MySortedQuery">

QUERY - Required. The name of the query you want to sort. Could be a CFQUERY, CFPOP, CFLDAP, or any other tag that presents its results as a query.

SORTCOLUMN - Required. The column name that you want the rows sorted by.

SORTORDER - "Asc" or "Desc". Defaults to "Asc".

SORTTYPE - "Textnocase", "Text", or "Numeric". Defaults to "Textnocase".

SORTEDQUERY - Defaults to "Sorted". After the tag runs, the sorted results will be available as a query with the name you specify here. Note that you can use the same name for the QUERY and SORTEDQUERY paramters, which would cause the original query to be overwritten by the sorted one.

Notes- This tag uses CF3.1 (and higher)'s ArraySort function to do the actual sorting. I realize that the job of sorting queries would probably be better done by a CFX .dll instead of a CFML Custom Tag. Until such a tag surfaces, this can be used in the interim.