Re: Changing point for commas and commas for point

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Changing point for commas and commas for point
Date: 2007-01-21 18:56:51
Message-ID: 20070121185651.GA2808@KanotixBox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Ezequias Rodrigues da Rocha <ezequias(dot)rocha(at)gmail(dot)com> schrieb:

> Hi list,
>
> Here in my country (Brazil) we have the decimal simbol as ' , ' (commas) and
> thousand separator as ' . ' (point)
>
> Here my sql uses: to_char(sum(My_column), '99990D00')
>
> Is there any way to make this happens ?

I think, you can use the 'G' as a group separator for this:

test=*# select to_char(12345.67, '999G990D00');
to_char
-------------
12.345,67
(1 row)

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknow)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Simon Kinsella 2007-01-21 23:52:28 Possible to emulate pre-8.2 behaviour of SET CONSTRAINTS?
Previous Message Tom Lane 2007-01-21 18:49:47 Re: Changing point for commas and commas for point