phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Csaba Skrabak <>
Subject Re: Phoenix: Convert String column to Integer column
Date Mon, 06 Nov 2017 11:41:06 GMT

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:

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" <> wrote:

>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
>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"
View raw message