Yes, that works. Thanks!

-----Original Message-----
From: C. Hatton Humphrey [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 20, 2001 9:55 AM
To: CF-Talk
Subject: RE: ORDER BY (SQL Server)


That is because your data type is set to a character type... use cast to
change it...

select cName, cSSN, cZipCode, CAST(Left(cZipCode, 5) AS INT) from
Informaiton order by CAST(Left(cZipCode, 5) AS INT)

HTH

C. Hatton Humphrey, Developer
Fisher, Towne & Associates
716-839-2141 x336
[EMAIL PROTECTED]


> -----Original Message-----
> From: James Taavon [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 20, 2001 9:35 AM
> To: CF-Talk
> Subject: ORDER BY (SQL Server)
>
>
> I have noticed when using an ORDER BY clause that my list sorts on first
> digit of a number and not the whole number. Does the data type
> definition in
> my database have any impact on the sort?
>
> Sorts like this right now:1, 10, 2, 20, 3, 30
>
> instead of: 1,2,3,10,20,30
>

______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to