title: SQL conflicted with the FOREIGN KEY constraint
body: <p>I am trying to run some update scripts on my database and I am getting the following error:</p>
  
  <blockquote>
    <p>The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_UPSELL_DT_AMRNO_AFMKTG_REF". The conflict occurred in database "ECOMVER", table "dbo.AFFILIATE_MKTG_REF", column 'AMRNO'.</p>
  </blockquote>
  
  <p>I am running the following script:</p>
  
  <pre><code>ALTER TABLE [dbo].[UPSELL_DATA]  WITH CHECK ADD 
          CONSTRAINT [FK_UPSELL_DT_AMRNO_AFMKTG_REF] FOREIGN KEY
          (
            [AMRNO]
          ) REFERENCES [dbo].[AFFILIATE_MKTG_REF] (
            [AMRNO]
          )
  GO
  </code></pre>
  
  <p>AMRNO is a PK in table AFFILIATE_MKTG_REF.</p>
  
  <p>Also, I tried to create the foreign key relation using the modify table option in SQL Management studio and I got the same error. I am not sure what I should be looking for?</p>
  
  <p>Any suggestions would be greatly appreciated.</p>