Hi Chinna, I think that your format string in the second parameter of TO_NUMBER should not be '\u00A4'. The format should be specified with this kind of pattern:
https://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html Does your "values" column actually contain currency signs (dollar sign) or just the decimal digit characters? The '\u00A4' is for parsing a currency sign. Try '#' if you have just the numeric characters in the column. select TO_NUMBER("values", '#') from "test_table" On 05/11/17 15:59, "Chinna ts" <gubt...@gmail.com> wrote: >Hi, > >I am looking for a Built-in UDF or any other method to convert values of a >string column to integer in my phoenix query for sorting using SELECT and >ORDER BY. > >I searched in the apache language Manual, but no use. Any other suggestions >also welcome. > >Actual Query > >select "values" from "test_table" > >I tried below approach but did not work > >select TO_NUMBER("values", '\u00A4') from "test_table"