SELECT 1032::numeric(10,2);


<[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hi.
> I have searched in mailing-list archives about converting types, but I 
> couldn't
> found a function or clause that convert a numeric type to money type.
> How Can I convert this types?
>
> => select '1234'::money;
>   money
> ------------
> R$1.234,00
>
> => select '1234'::numeric::money;
> ERROR:  cannot cast type numeric to money
>
> The problem is becouse I have a table with "numeric" field, and I need to 
> show
> it like "money" type (R$ 1.234,00). Is there a function to convert it??? 
> Or is
> there a function to mask the numeric field to show like money (with
> R$x.xxx,xx)???
>
> Thanks.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
> 



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to