| From: | "Gilberto Castillo" <gilberto(dot)castillo(at)etecsa(dot)cu> |
|---|---|
| To: | "Romero, Fernando" <fromero(at)cferroviarios(dot)com(dot)ar> |
| Cc: | "'gilberto(dot)castillo(at)etecsa(dot)cu'" <gilberto(dot)castillo(at)etecsa(dot)cu>, "pgsql-es-ayuda(at)postgresql(dot)org" <pgsql-es-ayuda(at)postgresql(dot)org> |
| Subject: | RE: Problemas con tabla |
| Date: | 2014-10-21 20:32:49 |
| Message-ID: | 44810.192.168.207.54.1413923569.squirrel@webmail.etecsa.cu |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-es-ayuda |
> Si, por eso quiero cambiar la definición del campo y me tira el error del
> final
>
> dbtrabajos=# ALTER TABLE "public"."trabajos" ALTER COLUMN "valor" TYPE
> numeric(30);
> ERROR: la columna ▒valor▒ no puede convertirse autom▒ticamente al tipo
> numeric
> SUGERENCIA: Especifique una expresi▒n USING para llevar a cabo la
> conversi▒n.
Para ello, lee la ayuda de esa orden.
Ahora puedes dejar tu definición y hacer cast de ese campo algo como
select sum(valor::integer) from tu_tabl;
Saludos,
Gilberto Castillo
La Habana, Cuba
| Attachment | Content-Type | Size |
|---|---|---|
| unknown_filename | text/plain | 179 bytes |
| unknown_filename | text/plain | 157 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Luis Fernando Ortiz Vera | 2014-10-21 21:56:43 | Consulta Vertica a Horizontal - Funcion crosstab |
| Previous Message | Gilberto Castillo | 2014-10-21 20:27:18 | Re: Problemas con tabla |