In the last episode (Jul 09), CVIOG at UGA said:
> I have a fairly basic question: How do I sort
> numerically? Normally when I query using "ORDER BY
> (field)", it orders by the first digit (i.e. 1, 10, 2,
> 21, 3, 32) rather than by number (1, 2, 3, 10, 21,
> 32).
Either alter the table to mak
Here is the solution I posted about t months ago. I would also add, this solution can
handle both text and numbers in the same field...:
my boss figured out a nice solution to this
ORDER BY IF(ABS(Item) > 0,LPAD(Item,9,'0'),Item)
This will pad numbers ( ok it might not do so hot with DECIMAL,
It looks like your field is a text field rather than BIGINT or some
numerical field. Changing the field type should solve your problem.
Serge.
- Original Message -
From: "CVIOG at UGA" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 09, 2002 4:22 PM
Subject: Basic Q's: N