title: Still FK conflict, even after investigation
body: <p>4.857 million rows went through the flow OK, and only 38.000 rows sent to error output. This due to a FK conflict. ---> "The INSERT statement conflicted with the FOREIGN KEY constraint "FK_FactTransactions_DimCustomer". 
  The conflict occurred in database "", table "dbo.DimCustomer", column 'CustomerNr'.".</p>
  
  <p>My problem is, after some investigation, i can't identify any conflict in the primary table dbo.dimcustomer.</p>
  
  <p>Lets take Mid(Named CustomerNr in the DB) "60534658" for an example and let us see. </p>
  
  <p><img src="https://i.stack.imgur.com/Jyy3x.jpg" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/OQhF8.jpg" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/6LnaQ.jpg" alt="enter image description here"></p>
  
  <p>Picture NR 
  1: This is a data-view draft of some of the rows that got sent to error output for analysis.</p>
  
  <p>2: This is the table where its supposed to insert, notice that rows with the same CustomerNr already exists, because some rows of the same CustomerNr, for a strange reason, got inserted while others did not</p>
  
  <p>3: And last. This is the actual primary table(Customer table), where the Mid(CustomerNr) reference clearly exists!</p>
  
  <p>Am i missing something here? why is it still in conflict?
  ty for any answers!</p>
  
  <hr>
  
  <p>TABLE STRUCTURE:</p>
  
  <pre><code>CREATE TABLE [dbo].[DimCustomer](
      [CustomerNr] [int] NOT NULL,
      [CustomerID] [int] NULL,
      [GeographyKey] [int] NULL,
      [OrgNum] [nvarchar](50) NULL,
      [CustomerName] [nvarchar](255) NULL,
      [Adress] [nvarchar](255) NULL,
      [ZipCode] [nvarchar](255) NULL,
      [MCC_Code] [float] NULL,
   CONSTRAINT [PK_Dim.Customer_1] PRIMARY KEY CLUSTERED 
  (
      [CustomerNr] ASC
  )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  ) ON [PRIMARY]
  
  GO
  
  ALTER TABLE [dbo].[DimCustomer]  WITH CHECK ADD  CONSTRAINT [FK_DimCustomer_DimGeography] FOREIGN KEY([GeographyKey])
  REFERENCES [dbo].[DimGeography] ([GeographyKey])
  GO
  
  ALTER TABLE [dbo].[DimCustomer] CHECK CONSTRAINT [FK_DimCustomer_DimGeography]
  
  GO
  
  CREATE TABLE [dbo].[FactTransactions](
      [TransactionKey] [int] IDENTITY(1,1) NOT NULL,
      [Reportdate] [date] NULL,
      [CustomerNr] [int] NULL,
      [SchemeID] [smallint] NULL,
      [PriceType] [int] NULL,
      [Count] [int] NULL,
      [Amount] [float] NULL,
      [Commission] [float] NULL,
      [InterchangeFee] [float] NULL,
      [Currency] [nvarchar](3) NULL,
      [FeeType] [int] NULL,
   CONSTRAINT [PK_FactTransactions] PRIMARY KEY CLUSTERED 
  (
  [TransactionKey] ASC
  )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  ) ON [PRIMARY]
  GO
  ALTER TABLE [dbo].[FactTransactions]  WITH CHECK ADD  CONSTRAINT [FK_FactTransactions_DimCardScheme] FOREIGN KEY([SchemeID])
  REFERENCES [dbo].[DimCardScheme] ([SchemeID])
  GO
  ALTER TABLE [dbo].[FactTransactions] CHECK CONSTRAINT [FK_FactTransactions_DimCardScheme]
  GO
  ALTER TABLE [dbo].[FactTransactions]  WITH CHECK ADD  CONSTRAINT [FK_FactTransactions_DimCustomer] FOREIGN KEY([CustomerNr])
  REFERENCES [dbo].[DimCustomer] ([CustomerNr])
  GO
  ALTER TABLE [dbo].[FactTransactions] CHECK CONSTRAINT [FK_FactTransactions_DimCustomer]
  GO
  ALTER TABLE [dbo].[FactTransactions]  WITH CHECK ADD  CONSTRAINT [FK_FactTransactions_DimDate] FOREIGN KEY([Reportdate])
  REFERENCES [dbo].[DimDate] ([Date])
  GO
  ALTER TABLE [dbo].[FactTransactions] CHECK CONSTRAINT [FK_FactTransactions_DimDate]
  GO
  ALTER TABLE [dbo].[FactTransactions]  WITH CHECK ADD  CONSTRAINT [FK_FactTransactions_DimPriceType] FOREIGN KEY([PriceType])
  REFERENCES [dbo].[DimPriceType] ([PriceType])
  GO
  ALTER TABLE [dbo].[FactTransactions] CHECK CONSTRAINT [FK_FactTransactions_DimPriceType]
  GO
  </code></pre>
  
  <hr>
  
  <p>Example error output line:</p>
  
  <p>2015-05-01,60534658,1,1,57,484,5280,3000000000002,78,340000000000003,0,EUR,57,1</p>