List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:April 18 2001 5:54pm
Subject:Re: Type conversion (String -> Int)
View as plain text  
Will Seitz wrote:
> 
> Hi,
> I am probably missing something obvious in the documentation, but how do I
> convert a string to an integer in mysql. I am sorting on a substring
> (String-Number) and want the substring sorted as an integer and not a string.
> 
> database, sql, query
> 
> Thanks,
> -Will Seitz
> 
> ---------------------------------------------------------------------

select substring(strnumb,5)+0 as subnum from mytable order by subnum;
Thread
Type conversion (String -> Int)Will Seitz18 Apr
  • Re: Type conversion (String -> Int)Paul DuBois18 Apr
  • Re: Type conversion (String -> Int)Gerald Clark18 Apr