If find that whatever your ordering on or grouping by or filtering on
always need to be present in the SELECT clause as well when using QoQ
(which aint the case when dealing with a database version of SQL

-----Original Message-----
From: Tangorre, Michael [mailto:[EMAIL PROTECTED]
Sent: 02 December 2003 12:47
To: CF-Talk
Subject: RE: Query of a query - sort order not correct?

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