The value violated the integrity constraints for the column

Category: SSISTags: ,

If you happen to get an error “The value violated the integrity constraints for the column”, it means that it tried to insert null value into the non nullable column in the database. If the source is table or in any other easily verifiable format, you can visually look at it. If the source is Excel, it is a bit tricky.

When the source data comes from Excel file and you get this error, it means that either blank rows exists somewhere in the middle of data or at the very end. Even though visually you will not be able to verify if the blank rows exists in Excel or not, try to select all the blank rows all the way upto the last Excel row, right click on the selection and press “Delete” to delete it, save the file and rerun the SSIS package again.

Hopefully this would solve your problem.



Your email address will not be published. Required fields are marked *

  1. luiz fernando says:

    Muito obrigado!!! muito mesmo. 2020!!!!!

  2. narsing says:

    Thanks, this solved my issue

  3. Mita Kumari Nayak says:

    When the column will be mandatory , what will write for that column?

    1. Hello Mita,

      If the column is mandatory, most of the time, you need to replicate the business logic at the time of insertion and insert data. If it is not possible, place a dummy/invalid data and update dummy/invalid data in subsequent steps within SSIS. You may want to handle scenario if package fails before dummy/invalid data is updated with valid data. There is also another possibility where you may want to insert the records in a staging table first. You may keep staging table columns optional. Once data is inserted into staging tables and validated, you may want to populate the column with valid data. Then populate real table from staging table data.

      Vishal Monpara


    there were blank rows in my excel, which resolved the issue.
    Thank You very much!