Don't know what DB you are using but a few things.

In SQL Server Trim() is not valid, you have to rtrim(ltrim()) it.

Second you do not have a column being selected that is equal to:
Trim(tblServiceArea.Service_Area_Desc)

You need to select this as one of the columns, then it should sort
correctly.

> -----Original Message-----
> From: Angel Stewart [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 03, 2002 2:52 PM
> To: CF-Community
> Subject: Why ain't it sorting?
> 
> Hey all,
> 
> I think I'm having some temporary cognitive failure hee hee
> 
> Whats wrong with this SQL?
> 
> -------------
> Select
>
Team_Tbl.Service_Area,Team_Tbl.Cost_Center_Cd,Team_Tbl.Cost_Center_Desc,
> 
> tblServiceArea.Service_Area,tblServiceArea.Service_Area_Desc
>               FROM tblServiceArea,Team_Tbl
> 
>               WHERE
>               tblServiceArea.Service_Area = Team_TBL.Service_Area
> 
> 
>               ORDER BY Trim(tblServiceArea.Service_Area_Desc)
> ---------------
> 
> 
> Umm..simple Order By statemnet...but it just doesn't sort.
> It spits the records out in any old order...going from C to A then to
> W..then T....I mean..what am I doing wrong? I know I gotta be doing
> SOMETHING wrong..Just don't know what.
> 
> ^_^
> 
> -Gel
> 
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com

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

Reply via email to