: ORDER BY (SQL
Server)
12/20/01
Use decimal or numeric for the data type.
At 09:34 AM 12/20/2001 -0500, you wrote:
>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
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
, 2001 9:55 AM
To: CF-Talk
Subject: Re: ORDER BY (SQL Server)
James,
Looks like your data type is text, in which case the order you have is
correct.
Changing the data type to numeric will order them in the correct numeric
order.
Regards
Stephen
- Original Message -
From: "James T
; <[EMAIL PROTECTED]>
Sent: Thursday, December 20, 2001 2:34 PM
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
MAIL 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
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
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
8 matches
Mail list logo