title: sql update statement conflict with foreign key
body: <p>I am trying to update a sql table with this stored procedure:</p>
  
  <pre><code>SET ANSI_NULLS ON
  GO
  SET QUOTED_IDENTIFIER OFF
  GO
  
  CREATE PROCEDURE [dbo].[UpdatePostingStatusAngel]
       @PostingStatusID tinyint,
       @PostingID int
  AS
  UPDATE dbo.Posting
  SET
      PostingStatusID = @PostingStatusID
  WHERE PostingID = @PostingID
  </code></pre>
  
  <p>When I am executing that query I am getting this error: <code>The UPDATE statement conflicted with the FOREIGN KEY constraint "FK_Posting_PaymentStatus". The conflict occurred in database "JobsDB2008", table "dbo.PaymentStatus", column 'PaymentStatusID'.</code></p>
  
  <p>This is really weird because I am not updating 'PaymentStatusID' column I don't know why it gives me conflict on that column. That column is also set to NULL and it has value already.
  I am trying to update only PostingStatusID field.
  Any idea what can be the reason?
  Thanks in advance, Laziale</p>