Changing point for commas and commas for point
Changing point for commas and commas for point
От:
"Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com>
Дата:
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 ?
Regards
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Atenciosamente (Sincerely)
Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/
Re: Changing point for commas and commas for point
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Ezequias Rodrigues da Rocha" writes: > 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') That's the right thing. > Is there any way to make this happens ? I think you forgot to set LC_NUMERIC. regression=# select to_char(42.45, '99990D00'); to_char ----------- 42.45 (1 row) regression=# set lc_numeric TO 'pt_PT.iso88591'; SET regression=# select to_char(42.45, '99990D00'); to_char ----------- 42,45 (1 row) The specific locale names available vary across OSes ... try "locale -a" for a list. regards, tom lane
Re: Changing point for commas and commas for point
От:
Andreas Kretschmer <akretschmer@spamfence.net>
Дата:
Ezequias Rodrigues da Rocha 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°