Search Postgresql Archives

Blank Numeric Column For INSERT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  I am trying to load 143K rows into a postgres-9.0.5 table from an ASCII
text file. The file consists of INSERT INTO ... statements and the VALUES
are comma delimited. One column is numeric (REAL), but ~10K rows have that
value missing, and postgres rejects the lines.

  The column does not have a NOT NULL constraint.

  The command line I use is 'psql -d <database_name> -f wq.sql'.

  Originally I had two commas in sequence since there were no values between
them. Next I tried a space between the two commas. I tried searching in the
9.0.5 manual for 'missing values', 'missing', and another term I don't
recall but found nothing.

  An example:

psql:wq.sql:8121: ERROR:  syntax error at or near ","
LINE 1: ...its) VALUES (214,'SW-6','1992-11-25','oil_grease', ,'mg/L');

  What is the approprate way to represent the missing column?

TIA,

Rich

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux