Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

maximum on a varchar2 column

400186Aug 16 2003 — edited Aug 19 2003
I have a table that has a varchar2 column called val, containing string representation of numbers, such as '123'. I want to find the largest number in that column. A query like SELECT max(val) FROM mytable doesn't work, as it returns '999' but there are values such as '1324' in that column. So what I need is a function to convert a string to number, but I don't see any way to do that in oracle (I want to go from '123' to 123).
Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 16 2003
Added on Aug 16 2003
6 comments
313 views