<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic [resolved] Violation of PRIMARY KEY constraint on SQL Server Identity in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Violation-of-PRIMARY-KEY-constraint-on-SQL-Server/m-p/2227329#M18973</link>
    <description>Hi,
&lt;BR /&gt;I have an SQL Server table with an Identity Column (named ID). I have enabled the "enable identity insert" on the relative tMSSqlOutput but when I launch the job in order to migrate data from an Access DB, I get the following error:
&lt;BR /&gt;"Violation of PRIMARY KEY constraint 'TABLE_PK'. Cannot insert duplicate key in object 'dbo.TABLE'. The duplicate key value is (0)."
&lt;BR /&gt;In other words, Talend adds the first row with ID 0, then it adds another row with the same ID 0.
&lt;BR /&gt;Why it happens? Thanks
&lt;BR /&gt;
&lt;BR /&gt;It happens because is responsability of MS SQL Server to populate the Identity Column. Remove the Identity Column from the output schema of tMap solve the problem.</description>
    <pubDate>Tue, 24 Feb 2015 13:36:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-02-24T13:36:02Z</dc:date>
    <item>
      <title>[resolved] Violation of PRIMARY KEY constraint on SQL Server Identity</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Violation-of-PRIMARY-KEY-constraint-on-SQL-Server/m-p/2227329#M18973</link>
      <description>Hi,
&lt;BR /&gt;I have an SQL Server table with an Identity Column (named ID). I have enabled the "enable identity insert" on the relative tMSSqlOutput but when I launch the job in order to migrate data from an Access DB, I get the following error:
&lt;BR /&gt;"Violation of PRIMARY KEY constraint 'TABLE_PK'. Cannot insert duplicate key in object 'dbo.TABLE'. The duplicate key value is (0)."
&lt;BR /&gt;In other words, Talend adds the first row with ID 0, then it adds another row with the same ID 0.
&lt;BR /&gt;Why it happens? Thanks
&lt;BR /&gt;
&lt;BR /&gt;It happens because is responsability of MS SQL Server to populate the Identity Column. Remove the Identity Column from the output schema of tMap solve the problem.</description>
      <pubDate>Tue, 24 Feb 2015 13:36:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Violation-of-PRIMARY-KEY-constraint-on-SQL-Server/m-p/2227329#M18973</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-24T13:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Violation of PRIMARY KEY constraint on SQL Server Identity</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Violation-of-PRIMARY-KEY-constraint-on-SQL-Server/m-p/2227330#M18974</link>
      <description>Hi,&lt;BR /&gt;Thanks for posting that you resolved it by yourself. It was quick, we didn't have the time to reply.&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Sat, 28 Feb 2015 03:19:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Violation-of-PRIMARY-KEY-constraint-on-SQL-Server/m-p/2227330#M18974</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-28T03:19:01Z</dc:date>
    </item>
  </channel>
</rss>

