Link to home
Start Free TrialLog in
Avatar of Mike_K123
Mike_K123

asked on

Error shows wrong table name

I am getting an error when attempting to update  records in a SQL table with records from a second SQL table on the same server and the same DB.

ERROR:

" Cannot insert the value NULL into column 'AColumnName', table 'My_Table'; column does not allow nulls. INSERT failed"

The table name shown in the error is not the table I am trying to update. Can someone help me understand why I am seeing a totally different table name in the error?

This is on a SQL Server 2016. The code I am using works on a SQL Server 2008.
ASKER CERTIFIED SOLUTION
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike_K123
Mike_K123

ASKER

Thank you. I needed to disable the trigger to complete the update.