Search Postgresql Archives

Selectively Importing Data

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

 



First consider the following table:

create table taxon (

  taxonid serial,
  descr text
);

As I understand it, "serial" means that column will automatically populate with a numerical key.

If I want to fill the field 'descr' with a list of scientific names stored in a spreadsheet, then how would I proceed?

I have a spreadsheet that has about a dozen columns. I copied the field with scientific names into a new spreadsheet. Then I created an empty field on the left. So I have a spreadsheet with two columns. I saved it as a CSV file.

When I try to import it with pgAdmin III, I get the error message

WARNING: null value in column "taxonid" violates non-null constraint

How can I import that single column into the second column in this table? Thanks.

[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