Try this...


<CFQUERY NAME="DirListing" DBTYPE="query">
SELECT
    UPPER(IsDirectory) AS dirName,  
    Name
FROM
    RootFiles
ORDER BY
    dirName DESC,
    Name
</CFQUERY>


-----Original Message-----
From: Bushy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 7:38 AM
To: CF-Talk
Subject: re: Query of a query - sort order not correct?

Hi,

I'm doing a query on a query but it won't sort properly.
With the "upper" it gives an error saying lower(IsDirectory) is not a column
that can be sorted on.

Why?

If I remove the "upper" to just

ORDER BY IsDirectory DESC, Name

the code will run but the sorting order is not correct.

<CFQUERY NAME="DirListing" DBTYPE="query">
SELECT IsDirectory,  Name
FROM RootFiles
ORDER BY upper(IsDirectory) DESC, Name
</CFQUERY>
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to