Обсуждение: question about money type

Поиск
Список
Период
Сортировка

question about money type

От
Marcio Macedo
Дата:
Hi all,

when I do a SELECT in a money field, it returns the folowing :

R$2.244,00

what is correct , according with my LOCALE settings,
is there a way to format this result to 

2.244,00 (without the "R$") ?


--Marcio MacedoConectiva




Re: [SQL] question about money type

От
"D'Arcy" "J.M." Cain
Дата:
Thus spake Marcio Macedo
> Hi all,
> 
> when I do a SELECT in a money field, it returns the folowing :
> 
> R$2.244,00
> 
> what is correct , according with my LOCALE settings,
> is there a way to format this result to 
> 
> 2.244,00 (without the "R$") ?

Not really.  There was once some discussion about removing the currency
string altogether on output (I even sent in patches) but it was decided
to keep it in because no one will be using the MONEY type eventually.
Everyone is being urged to use the NUMERIC type.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.


Re: [SQL] question about money type

От
jwieck@debis.com (Jan Wieck)
Дата:
D'Arcy J.M. Cain wrote:

>
> Thus spake Marcio Macedo
> > Hi all,
> >
> > when I do a SELECT in a money field, it returns the folowing :
> >
> > R$2.244,00
> >
> > what is correct , according with my LOCALE settings,
> > is there a way to format this result to
> >
> > 2.244,00 (without the "R$") ?
>
> Not really.  There was once some discussion about removing the currency
> string altogether on output (I even sent in patches) but it was decided
> to keep it in because no one will be using the MONEY type eventually.
> Everyone is being urged to use the NUMERIC type.

    I  really wanted to add TO_CHAR() function for NUMERIC before
    release. But there are more important items  in  the  rewrite
    system I have to fix first.

    Since  TO_CHAR()  cannot have any side effects I could add it
    until the last hour before Marc starts "closed shop".


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #