On 30-Aug-2001 Iago Sineiro wrote:
> Hi all.
>
> Anybody knows a function or some way to convert a string to a integer? I've
> looked in the manual and I haven't seen anything.
>
> I need it to order a query by a column which contains numbers but the type
> of the column is varchar. I want to convert the values to integer before
> ordering the query.
>
select mystr+0 as myint from foo order by myint;
Regards,
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
(53kr33t w0rdz: sql table query)
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php