0

I have:

TAG_ID,TAGNAME,HH_INCEPT,ACCOUNTNUMBER,ACCT_START_DATE,ACCT_STOP_DATE,ORION_CLIENT_TRAIL
45298,JIM JONES,11/16/07,905413871,11/16/07,8/15/14,

My create table:

CREATE TABLE folio_groups
(
  id serial NOT NULL,
  tag_id integer NOT NULL,
  tagname character varying(50) NOT NULL,
  hh_incept date NOT NULL,
  accountnumber character varying(50) NOT NULL,
  acct_start_date date NOT NULL,
  acct_stop_date date,
  orion_client_trail integer
)

And I try:

# COPY folio_groups FROM '/tmp/folio.csv' CSV HEADER;

But get:

ERROR:  invalid input syntax for integer: "JIM JONE"
CONTEXT:  COPY folio_groups, line 2, column tag_id: "JIM JONE"

Any idea how to copy this simple CSV?

1 Answer 1

2
COPY folio_groups (
  tag_id,
  tagname,
  hh_incept_date,
  accountnumber,
  acct_start_date,
  acct_stop_date,
  orion_client_trail
)
FROM '/tmp/folio.csv' CSV HEADER;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.