0

I'm trying to insert new rows to an empty table in the DB using dbSendUpdate() from RJDBC package. The fields in the table are as such:

  • integer(10)

  • varchar(255)

  • bigint(19)

  • smallint(5)

  • double(15)

The columns in the data.frame are:

  • character

  • numeric

  • int

The way I'm doing it, I'm trying to:

  • insert numeric into double(15),

  • character into varchar(255)

  • int into smallint(5)

  • numeric into bigint(19)

  • integers to integer(10)

I'm exporting the data.frame to csv and try to load it to the DB. Could someone explain the correspondence between R and SQL column types, so they could be inserted to the DB?

The error I'm getting is External table count of bad input rows reached maxerrors limit, although R doesn't give me the info about which column/row causes the problem. I'm not very good with SQL, so I'm not sure where to dig

vladli
  • 1,454
  • 2
  • 16
  • 40

1 Answers1

0

I figured I had character columns with commas in them. That messed the csv file, as comma symbol was a delimiter, so it was no longer valid. After this was fixed, I was able to upload the data without problems. So I guess my scheme of corresponding types was ok after all

vladli
  • 1,454
  • 2
  • 16
  • 40