| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.oracle -> Re: convert string to int
You're looking for the TO_NUMBER() function. You could supply various
format models for this if necessary but the following will get you
going.
select str_col from table order by to_number(str_col);
See the SQL Reference Manual for loads of info (http://tahiti.oracle.com).
Cheers.
"Cindy Lee" <dangreece_at_hotmail.com> wrote in message news:<f23c08f9934aea55ede045a72bf59e4e_at_news.meganetnews.com>...
> in my query can I convert a string to int
>
> select convert(int,str_col) from table
>
>
> I just need the order by, if there's a different way.
>
> select str_col from table order by convert(int,str_col)
Received on Tue Jun 22 2004 - 20:36:11 CDT
![]() |
![]() |