Topic: CSV import into database (Oracle), error that value too large when nil

I am iterating through a CSV file and importing the records into an Oracle table via ruby-oci8.    The issue is, that even though 'timezoneid/row[10]' is nil in the CSV file, I am getting an Oracle error that the value is too large.

Any ideas on how to recitify this?

- Action Controller Error:

OCIError: ORA-12899: value too large for column "PRESENCE"."PCO_OUTBOUNDQUEUE"."TIMEZONEID" (actual: 8, maximum: 5): INSERT INTO pco_outboundqueue

- Controller:

lead =
      lead.timezoneid = row[10]
      lead.sourceid       = row[0]           = row[1]
      lead.capturingagent = row[2]          = row[3]
      lead.phone1         = row[4]
      lead.phone2         = row[5]
      lead.phone3         = row[6]
      lead.phonedesc1     = row[7]
      lead.phonedesc2     = row[8]
      lead.phonedesc3     = row[9]
      lead.comments       = row[11]

- CSV entry:

1234,"John Doe",4567,"3035551212",,,,,,,,"Test record 1"

Last edited by muppetmaster (2006-11-13 17:29:34)