Re: to_number - Mailing list pgsql-sql

From Tomasz Myrta
Subject Re: to_number
Date
Msg-id 20030330155626.M93108@klaster.net
Whole thread Raw
In response to to_number  (Kaare Rasmussen <kar@kakidata.dk>)
Responses Re: to_number  (Kaare Rasmussen <kar@kakidata.dk>)
List pgsql-sql
> # SELECT * FROM pg_settings WHERE name LIKE 'lc_%';
>     name     | setting
> -------------+---------
>  lc_messages | unset
>  lc_monetary | C
>  lc_numeric  | C
>  lc_time     | C
> (4 rows
> 
> SELECT price, to_number(price,'9999D9)') FROM orderline WHERE sku = 
> '01-0082-4';
>  price | to_number
> -------+-----------
>  429,5 |      4295
>  429,5 |      4295
>  429,5 |      4295
>  429,5 |      4295
>  429,5 |      4295
>  429,5 |      4295
>  429,5 |      4295
>  429,5 |      4295
>  429,5 |      4295
>  429,5 |      4295
> (10 rows)
> 
> How can to_number work with Danish locale?

It looks like you have "C" locale instead of Danish one. What happens when 
you change your system locale to Danish?.

Regards,
Tomasz Myrta



pgsql-sql by date:

Previous
From: Kaare Rasmussen
Date:
Subject: to_number
Next
From: Kaare Rasmussen
Date:
Subject: Re: to_number