How about select max(floor(field)) from table ?

TK

> -----Opprinnelig melding-----
> Fra: Kraa de Simon [mailto:[EMAIL PROTECTED]]
> Sendt: 22. oktober 2001 08:44
> Til: Php-General (E-mail); MySQL (E-mail)
> Emne: Max int value of char field? How to find...
>
>
> Hello all,
>
> How can I find the highest integer value in a result set like:
>
> 1
> 10
> 11
> 2
> 3
> a
> ab
> abc
>
> I'm looking for the value 11.
>
> The statement 'select max(field) from table' gives me 'abc' so this won't
> do.
>
> Any ideas for a SQL statement that will do the trick?
>
> I'm using PHP / MySQL.
>
> Thanks!
>
> Simon.
>
> ---------------------------------------------------------------------
> 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
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to