<?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 Re: Using &amp;quot;update or insert&amp;quot; failing with composite primary key in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Using-quot-update-or-insert-quot-failing-with-composite-primary/m-p/2241505#M28635</link>
    <description>Hi 
&lt;BR /&gt;From the error message, we can see there is a primary key PK__AUDIT_MV__A9AE970D0AD2A005 in target table, If you try to update a field in your row that is part of a primary key constraint, even if it has the same value as the row you're trying to update already has, then the command assumes that you're doing an insert. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
    <pubDate>Fri, 11 Mar 2011 02:28:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-03-11T02:28:36Z</dc:date>
    <item>
      <title>Using "update or insert" failing with composite primary key</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-quot-update-or-insert-quot-failing-with-composite-primary/m-p/2241504#M28634</link>
      <description>Hello, 
&lt;BR /&gt;I am trying to migrate data from Oracle to MSSQL. This job needs to be re-runnable such that it will update data (by key) in dest database (if already present) and insert if not present. The source oracle table has a composite pk comprising 4 columns. In advanced section, I have set the Update Key to be these four columns, but I see the following errors being reported ar run time: 
&lt;BR /&gt;Violation of PRIMARY KEY constraint 'PK__AUDIT_MV__A9AE970D0AD2A005'. Cannot insert duplicate key in object 'dbo.AUDIT_MVT'. 
&lt;BR /&gt;Violation of PRIMARY KEY constraint 'PK__AUDIT_MV__A9AE970D0AD2A005'. Cannot insert duplicate key in object 'dbo.AUDIT_MVT'. 
&lt;BR /&gt;Violation of PRIMARY KEY constraint 'PK__AUDIT_MV__A9AE970D0AD2A005'. Cannot insert duplicate key in object 'dbo.AUDIT_MVT'. 
&lt;BR /&gt;Violation of PRIMARY KEY constraint 'PK__AUDIT_MV__A9AE970D0AD2A005'. Cannot insert duplicate key in object 'dbo.AUDIT_MVT'. 
&lt;BR /&gt;Violation of PRIMARY KEY constraint 'PK__AUDIT_MV__A9AE970D0AD2A005'. Cannot insert duplicate key in object 'dbo.AUDIT_MVT'. 
&lt;BR /&gt;Violation of PRIMARY KEY constraint 'PK__AUDIT_MV__A9AE970D0AD2A005'. Cannot insert duplicate key in object 'dbo.AUDIT_MVT'. 
&lt;BR /&gt;Violation of PRIMARY KEY constraint 'PK__AUDIT_MV__A9AE970D0AD2A005'. Cannot insert duplicate key in object 'dbo.AUDIT_MVT'. 
&lt;BR /&gt;Violation of PRIMARY KEY constraint 'PK__AUDIT_MV__A9AE970D0AD2A005'. Cannot insert duplicate key in object 'dbo.AUDIT_MVT'. 
&lt;BR /&gt;...... 
&lt;BR /&gt;PS. Am using 42.0.M3_r54685</description>
      <pubDate>Sat, 16 Nov 2024 13:02:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-quot-update-or-insert-quot-failing-with-composite-primary/m-p/2241504#M28634</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using "update or insert" failing with composite primary key</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-quot-update-or-insert-quot-failing-with-composite-primary/m-p/2241505#M28635</link>
      <description>Hi 
&lt;BR /&gt;From the error message, we can see there is a primary key PK__AUDIT_MV__A9AE970D0AD2A005 in target table, If you try to update a field in your row that is part of a primary key constraint, even if it has the same value as the row you're trying to update already has, then the command assumes that you're doing an insert. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 11 Mar 2011 02:28:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-quot-update-or-insert-quot-failing-with-composite-primary/m-p/2241505#M28635</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-11T02:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using "update or insert" failing with composite primary key</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-quot-update-or-insert-quot-failing-with-composite-primary/m-p/2241506#M28636</link>
      <description>Thanks Shong, 
&lt;BR /&gt;What I am trying to do is match on PK ('PK__AUDIT_MV__A9AE970D0AD2A005') and update the existing dest record (by PK) or insert. Is there a way to do this be just using a tOracleInput sending to a tMSSqlOutput ? 
&lt;BR /&gt;Any suggestions would be much appreciated.</description>
      <pubDate>Fri, 11 Mar 2011 09:24:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-quot-update-or-insert-quot-failing-with-composite-primary/m-p/2241506#M28636</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-11T09:24:02Z</dc:date>
    </item>
  </channel>
</rss>

