maximum on a varchar2 column
400186Aug 16 2003 — edited Aug 19 2003I 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.