Ken
******
On Wed, 12 May 2004 07:47:11 -0400, Bill Easton <[EMAIL PROTECTED]> wrote:
You could also use "order by cost+0,cost". This puts the non-numerics first, then the numerics in numerical order. (You'd need to get fancier if there are non-numerics starting with a digit or numerics <= 0.)
From: Sasha Pachev <[EMAIL PROTECTED]>County."
[EMAIL PROTECTED] wrote:
> How do I set up a column (cost) that contains numbers and text so that
> the numbers will sort the numbers accurately? Using varchar results in
> a sort based on the first digit, so that I get e.g. 1, 10, 100, 3. . .
> when the command is "order by cost." Almost all of the text is "Bynum_val,
Ken:
Consider having two columns - num_val, and text_val, and then order bytext_val
-- Sasha Pachev Create online surveys at http://www.surveyz.com/
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]