<?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>Question Re: Syntax for UPSERT using a subquery in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584352#M3851069</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what's your point here.&lt;/P&gt;&lt;P&gt;If you really feel that re-surfacing this old discussion then please provide some context.&lt;/P&gt;&lt;P&gt;What is not working for you with the UPSERT command?&lt;/P&gt;&lt;P&gt;What do you expect it to do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could it be that you don't really understand what the reason for the unique constraint violation in Wenjun's example was?&lt;/P&gt;&lt;P&gt;It's definitively correct and works as expected. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Aug 2015 11:26:18 GMT</pubDate>
    <dc:creator>lbreddemann</dc:creator>
    <dc:date>2015-08-12T11:26:18Z</dc:date>
    <item>
      <title>Syntax for UPSERT using a subquery</title>
      <link>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaq-p/10584343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, I can't seem to figure this one out so maybe someone has hit the same issue. I am guessing it's a syntax problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPSERT works fine when dealing with a single row, but I can't get this to work for a subquery.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Works fine&lt;/P&gt;&lt;P&gt;UPSERT &amp;lt;TABLE&amp;gt; (COLUMN1, COLUMN2) VALUES ('VALUE1', 'VALUE2') WITH PRIMARY KEY;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax error near "PRIMARY"&lt;/P&gt;&lt;P&gt;UPSERT &amp;lt;TABLE&amp;gt; (COLUMN1, COLUMN2) VALUES (SELECT COLUMN1, COLUMN2 FROM TABLE2) WITH PRIMARY KEY;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same thing tried another way&lt;/P&gt;&lt;P&gt;UPSERT &amp;lt;TABLE&amp;gt; (COLUMN1, COLUMN2) (SELECT COLUMN1, COLUMN2 FROM TABLE2) WITH PRIMARY KEY;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used this successfully before with INSERT, but I am thinking the UPSERT is a slightly different animal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Justin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 20:42:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaq-p/10584343</guid>
      <dc:creator>justin_molenaur2</dc:creator>
      <dc:date>2014-09-09T20:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for UPSERT using a subquery</title>
      <link>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584344#M3851061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Justin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First you can find the syntax here. &lt;A href="http://help.sap.com/saphelp_hanaplatform/helpdata/en/20/fc06a7751910149892c0d09be21a38/content.htm?frameset=/en/2e/1ef8b4f4554739959886e55d4c127b/frameset.htm&amp;amp;current_toc=/en/2e/1ef8b4f4554739959886e55d4c127b/plain.htm&amp;amp;node_id=194" title="http://help.sap.com/saphelp_hanaplatform/helpdata/en/20/fc06a7751910149892c0d09be21a38/content.htm?frameset=/en/2e/1ef8b4f4554739959886e55d4c127b/frameset.htm&amp;amp;current_toc=/en/2e/1ef8b4f4554739959886e55d4c127b/plain.htm&amp;amp;node_id=194"&gt;REPLACE | UPSERT - SAP HANA SQL and System Views Reference - SAP Library&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&amp;gt; UPSERT &amp;lt;TABLE&amp;gt; (COLUMN1, COLUMN2) VALUES ('VALUE1', 'VALUE2') WITH PRIMARY KEY;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;It's correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&amp;gt; UPSERT &amp;lt;TABLE&amp;gt; (COLUMN1, COLUMN2) VALUES (SELECT COLUMN1, COLUMN2 FROM TABLE2) WITH PRIMARY KEY;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;It's incorrect. Should be &lt;SPAN style="color: #333333; font-size: 12px;"&gt;UPSERT &amp;lt;TABLE&amp;gt; (COLUMN1, COLUMN2) SELECT COLUMN1, COLUMN2 FROM TABLE2;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&amp;gt; &lt;SPAN style="color: #333333; font-size: 12px;"&gt;UPSERT &amp;lt;TABLE&amp;gt; (COLUMN1, COLUMN2) (SELECT COLUMN1, COLUMN2 FROM TABLE2) WITH PRIMARY KEY;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;It's incorrect. Should be &lt;SPAN style="color: #333333; font-size: 12px;"&gt;UPSERT &amp;lt;TABLE&amp;gt; (COLUMN1, COLUMN2) SELECT COLUMN1, COLUMN2 FROM TABLE2;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Wenjun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 02:40:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584344#M3851061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-10T02:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for UPSERT using a subquery</title>
      <link>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584345#M3851062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Wenjun - of course I read the help docs before posting a question &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1024/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That being said, there are no real examples of what I am trying to do. What I was missing was that the primary key handling is implicitly defined when operating on a set basis. The key point is that the columns that the full primary key must be included in the column list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Justin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 13:32:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584345#M3851062</guid>
      <dc:creator>justin_molenaur2</dc:creator>
      <dc:date>2014-09-10T13:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for UPSERT using a subquery</title>
      <link>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584346#M3851063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Justin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what exactly is it you want to do though? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Lars&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 13:39:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584346#M3851063</guid>
      <dc:creator>lbreddemann</dc:creator>
      <dc:date>2014-09-10T13:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for UPSERT using a subquery</title>
      <link>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584347#M3851064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Lars, there's nothing complex here - just trying to UPSERT a subquery. It's working fine now, just a minor syntax issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now looking back at the help page, the very last statement would be the best example. However, it was not clear to me that the "WITH PRIMARY KEY" clause is not required for a subquery.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Justin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 13:44:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584347#M3851064</guid>
      <dc:creator>justin_molenaur2</dc:creator>
      <dc:date>2014-09-10T13:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for UPSERT using a subquery</title>
      <link>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584348#M3851065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't worry - I had to fiddle with this for quite some time as well.&lt;/P&gt;&lt;P&gt;It's a really underused statement and unfortunately far from MERGE on other platforms... &lt;SPAN __jive_emoticon_name="sad" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1024/images/emoticons/sad.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, Lars&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 13:48:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584348#M3851065</guid>
      <dc:creator>lbreddemann</dc:creator>
      <dc:date>2014-09-10T13:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for UPSERT using a subquery</title>
      <link>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584349#M3851066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I guess that only on a single row update basis ('VALUES' statement) is the "WITH PRIMARY KEY" clause required?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it your understanding that a subquery should automatically honor the primary keys of the target table and either INSERT or UPDATE accordingly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Justin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 13:55:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584349#M3851066</guid>
      <dc:creator>justin_molenaur2</dc:creator>
      <dc:date>2014-09-10T13:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for UPSERT using a subquery</title>
      <link>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584350#M3851067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Justin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&amp;gt; So I guess that only on a single row update basis ('VALUES' statement) is the "WITH PRIMARY KEY" clause required?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"WITH PRIMARY KEY" is not a must on a single row update. You can use WHERE &amp;lt;condition&amp;gt; instead. Sometimes you use &lt;STRONG&gt;neither &lt;/STRONG&gt;&lt;STRONG style="font-size: 13.3333330154419px;"&gt;WHERE &amp;lt;condition&amp;gt; nor &lt;STRONG style="font-size: 13.3333330154419px;"&gt;WITH PRIMARY KEY&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax:&lt;/P&gt;&lt;P&gt;UPSERT &amp;lt;table_name&amp;gt; [ &amp;lt;column_list_clause&amp;gt; ] { &amp;lt;value_list_clause&amp;gt; [ &lt;STRONG&gt;WHERE &amp;lt;condition&amp;gt;&lt;/STRONG&gt; | &lt;STRONG&gt;WITH PRIMARY KEY&lt;/STRONG&gt; ] | &amp;lt;subquery&amp;gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;SPAN style="color: #333333; font-size: 12px;"&gt;Is it your understanding that a subquery should automatically honor the primary keys of the target table and either INSERT or UPDATE accordingly?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes; otherwise the behavior is weird and the logic is incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For better understanding, I created some examples for you. Hope you can understand UPSERT/REPLACE better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 1: Without primary key&lt;/P&gt;&lt;P&gt;CREATE COLUMN TABLE U (ID INTEGER, VAL INTEGER);&lt;/P&gt;&lt;P&gt;UPSERT U VALUES (1, 1); -- Table U has &amp;lt;1, 1&amp;gt;&lt;/P&gt;&lt;P&gt;UPSERT U VALUES (2, 2); -- Table U has &amp;lt;2, 2&amp;gt;&lt;/P&gt;&lt;P&gt;UPSERT U VALUES (3, 3); -- Table U has &amp;lt;3, 3&amp;gt;&lt;/P&gt;&lt;P&gt;UPSERT U (VAL) VALUES (4); -- Table U has &amp;lt;3, 4&amp;gt;&lt;/P&gt;&lt;P&gt;UPSERT U VALUES (1, 2) WHERE ID = 1; -- Table U has &amp;lt;3, 4&amp;gt; and &amp;lt;1, 2&amp;gt;&lt;/P&gt;&lt;P&gt;UPSERT U (VAL) VALUES (5); -- Table U has &amp;lt;3, 5&amp;gt; and &amp;lt;1, 5&amp;gt;&lt;/P&gt;&lt;P&gt;UPSERT U VALUES (10, 10); -- Table U has &amp;lt;10, 10&amp;gt;, &amp;lt;10, 10&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 2: With primary key&lt;/P&gt;&lt;P&gt;CREATE COLUMN TABLE UU (ID INTEGER PRIMARY KEY, VAL INTEGER);&lt;/P&gt;&lt;P&gt;UPSERT UU VALUES (1, 1); -- Table U has &amp;lt;1, 1&amp;gt;&lt;/P&gt;&lt;P&gt;UPSERT UU VALUES (2, 2); -- Table U has &amp;lt;2, 2&amp;gt;&lt;/P&gt;&lt;P&gt;UPSERT UU VALUES (3, 3); -- Table U has &amp;lt;3, 3&amp;gt;&lt;/P&gt;&lt;P&gt;UPSERT UU (VAL) VALUES (4); --ERROR: cannot insert NULL or update to NULL: ID. In this case, you need to include primary key.&lt;/P&gt;&lt;P&gt;UPSERT UU (ID, VAL) VALUES (3, 4); -- Table U has &amp;lt;3, 4&amp;gt;&lt;/P&gt;&lt;P&gt;UPSERT UU VALUES (1, 2) WHERE ID = 1; -- Table U has &amp;lt;3, 4&amp;gt; and &amp;lt;1, 2&amp;gt;&lt;/P&gt;&lt;P&gt;UPSERT UU (VAL) VALUES (5); --ERROR: cannot insert NULL or update to NULL: ID. In this case, you need to include primary key.&lt;/P&gt;&lt;P&gt;UPSERT UU (ID, VAL) VALUES (1, 5); --ERROR: unique constraint violation. The reason is very simple. Table U cannot own two &amp;lt;1, 5&amp;gt;&lt;/P&gt;&lt;P&gt;UPSERT UU VALUES (10, 10); --ERROR: unique constraint violation. The reason is very simple. Table U cannot own two &amp;lt;10, 10&amp;gt;&lt;/P&gt;&lt;P&gt;UPSERT UU VALUES (1, 10) WITH PRIMARY KEY; --Equal with UPSERT UU VALUES (1, 10) WHERE ID = 1. Table U has &amp;lt;3, 4&amp;gt; and &amp;lt;1, 10&amp;gt;&lt;/P&gt;&lt;P&gt;UPSERT UU VALUES (3, 10) WITH PRIMARY KEY; --Equal with UPSERT UU VALUES (1, 10) WHERE ID = 3. Table U has &amp;lt;3, 10&amp;gt; and &amp;lt;1, 10&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Wenjun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Sep 2014 02:57:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584350#M3851067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-11T02:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for UPSERT using a subquery</title>
      <link>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584351#M3851068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is absolutely purposeless ..when it says unique constraint violation during upsert operation!! Lol ...that is exactly when upsert has to decide and do an update operation on the row in question ...the very purpose of doing upsert is missing&amp;nbsp; &lt;SPAN __jive_emoticon_name="sad" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1322/images/emoticons/sad.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 10:47:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584351#M3851068</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-08-12T10:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for UPSERT using a subquery</title>
      <link>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584352#M3851069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what's your point here.&lt;/P&gt;&lt;P&gt;If you really feel that re-surfacing this old discussion then please provide some context.&lt;/P&gt;&lt;P&gt;What is not working for you with the UPSERT command?&lt;/P&gt;&lt;P&gt;What do you expect it to do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could it be that you don't really understand what the reason for the unique constraint violation in Wenjun's example was?&lt;/P&gt;&lt;P&gt;It's definitively correct and works as expected. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 11:26:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584352#M3851069</guid>
      <dc:creator>lbreddemann</dc:creator>
      <dc:date>2015-08-12T11:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for UPSERT using a subquery</title>
      <link>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584353#M3851070</link>
      <description>&lt;P&gt;Actually there is a better way of doing Upsert. Try the MERGE statement. It does the same Update or Insert, with easily coding. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/2.0.02/en-US/3226201f95764a57810dd256c9524d56.html?q=MERGE"&gt;https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/2.0.02/en-US/3226201f95764a57810dd256c9524d56.html?q=MERGE&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 14:55:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584353#M3851070</guid>
      <dc:creator>former_member698728</dc:creator>
      <dc:date>2019-11-25T14:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for UPSERT using a subquery</title>
      <link>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584354#M3851071</link>
      <description>&lt;P&gt;Why exactly does the 'with primary key' not work with subqueries? I can't seem to find any explanation online.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Mihai&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 14:11:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/syntax-for-upsert-using-a-subquery/qaa-p/10584354#M3851071</guid>
      <dc:creator>chindrism96</dc:creator>
      <dc:date>2024-01-09T14:11:42Z</dc:date>
    </item>
  </channel>
</rss>

