Thanks i also found the function CAST which works ok.
So now i have three options:

CAST
LPAD
Adding zero

Any other sugestions are welcome!

Quoting [EMAIL PROTECTED]:

> Test USER <[EMAIL PROTECTED]> wrote on 11/23/2005 07:36:43 PM:
> 
> > Is the only way to sort numbers stored in a varchar column to use
> lpad?
> > Are there any other columntypes that allow both characters and 
> > numbers that can 
> > sort numbers correct?
> > 
> > -------------------------------------------------
> > FREE E-MAIL IN 1 MINUTE!
> >  - [EMAIL PROTECTED] - http://www.pc.nu
> > 
> 
> You can try adding zero to the column. It's a function acting on a value
> 
> so any chance of using an index is eliminated but you can get your
> columns 
> as numbers that way. To answer your second question, no. Fields are
> either 
> strings or numbers but never both.
> 
> Shawn Green
> Database Administrator
> Unimin Corporation - Spruce Pine



 

-------------------------------------------------
FREE E-MAIL IN 1 MINUTE!
 - [EMAIL PROTECTED] - http://www.pc.nu

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to