[Gfoss] inserire nuove righe in una tabelle postgresql

Luca Delucchi lucadeluge at gmail.com
Tue Mar 13 17:05:13 CET 2007


Ciao a tutti sto cercando di inserire alcuni dati in una tabella, ma mi
vengono dati alcuni errori:

datageo=# \d dati_movimenti_turistici
      Tabella "public.dati_movimenti_turistici"
   Colonna    |          Tipo          | Modificatori
--------------+------------------------+--------------
 codice_istat | character varying(6)[] | not null
 1960_1965    | numeric                |
 1965-1970    | numeric                |
 1970-1975    | numeric                |
 1975-1980    | numeric                |
 1980-1985    | numeric                |
 1985-1990    | numeric                |
 1995-2000    | numeric                |
 2000-2005    | numeric                |

datageo=# INSERT INTO dati_movimenti_turistici (codice_istat, 1960_1965)
VALUES (004098, 2683);
ERROR:  syntax error at or near "1960" at character 53
RIGA 1: ...SERT INTO dati_movimenti_turistici (codice_istat, 1960_1965)...
                                                             ^
datageo=# INSERT INTO dati_movimenti_turistici (codice_istat) VALUES
(004098);
ERROR:  column "codice_istat" is of type character varying[] but expression
is of type integer
HINT:  Devi riscrivere o eseguire un casting dell'espressione


Oltre ad inserire i valori in questo modo è possibile importare una tabella
di un foglio di calcolo in una tabella di un database?

Grazie
Luca
-------------- parte successiva --------------
Un allegato HTML ? stato rimosso...
URL: http://www.faunalia.com/pipermail/gfoss/attachments/20070313/336da796/attachment.htm 


More information about the Gfoss mailing list