| From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> | 
|---|---|
| To: | Dani - plq <degea(at)plq(dot)es> | 
| Cc: | pgsql-es-ayuda(at)postgresql(dot)org | 
| Subject: | Re: Probelma con lc_numeric | 
| Date: | 2008-12-22 16:30:07 | 
| Message-ID: | 20081222163007.GF10220@alvh.no-ip.org | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-es-ayuda | 
Dani - plq escribió:
> Hola lista,
>
> Tengo un problema con el separador de decimales:
> hago:
>
> select '2,00'::numeric
>
> y me dice
>
> ERROR: invalid input syntax for type numeric: "2,00"
> Estado SQL:22P02
Me parece que no se puede :-( Puedes usar to_number:
alvherre=# select to_number('2,00', '99G999D9');
 to_number 
-----------
       2.0
(1 fila)
-- 
Alvaro Herrera                 http://www.amazon.com/gp/registry/DXLWNGRJD34J
"Postgres is bloatware by design: it was built to house
 PhD theses." (Joey Hellerstein, SIGMOD annual conference 2002)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ricardo Mendoza | 2008-12-22 16:40:41 | error al instalar postgresql-8.3.5 con python | 
| Previous Message | Dani - plq | 2008-12-22 16:25:29 | Probelma con lc_numeric |