U running MS SQL server 7 ?

 -----Original Message-----
From:   Gieseman, Athelene [mailto:[EMAIL PROTECTED]] 
Sent:   04 December 2000 15:41
To:     CF-Talk
Subject:        OT:  Order By Question

I've got a query that works fine except that it seems to be ignoring the
order by clause.  It seems to be sorting in order of the primary key.  Any
suggestions?

The query is:

<cfquery datasource="HelpDesk" name="EditRecordqry">
Select *, DATENAME(MM, CALLDATE) + ' ' + DATENAME(DD, CALLDATE) + ', ' +
DATENAME(YYYY, CALLDATE)AS 'DATEOFCALL', 
DATENAME(MM, LASTUPDATE) + ' ' + DATENAME(DD, LASTUPDATE) + ', ' +
DATENAME(YYYY, LASTUPDATE)AS 'LU',
Ext, EmailAddress
from CALLS, USERS WHERE (CALLS.Closed='N' or CALLS.Closed IS NULL) AND
(CALLS.Name = USERS.Name) order by Users.Name
</cfquery>

I've also tried sorting by CALLS.Name, same result.  

Athelene Gieseman
[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to