Skip to main content

INSERT fails with SQL error code -39 on an EXCEL's worksheet

  • February 15, 2013
  • 0 replies
  • 0 views

Problem:

An attempt to do an INSERT into a MS Excel worksheet fails with SQL error code -39 that says "invalid character value for cast specification null."

Resolution:

Make sure the value to be inserted is allowed in the receiving field. For example, inserting a non-numeric value into a numeric field will fail with the SQL error code -39. To resolve it, either change the receiving field as alpha or make sure the value is numeric before inserting it.

Old KB# 7109