<?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: SQL Merge Statement not working in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/sql-merge-statement-not-working/m-p/5972#M2229</link>
    <description>&lt;P&gt;I was missing the THEN before UPDATE, INSERT and DELETE. This keyword is missing from the documentation on Databricks &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/delta/merge" target="test_blank"&gt;https://learn.microsoft.com/en-us/azure/databricks/delta/merge&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It now works. Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 13 Apr 2023 18:11:03 GMT</pubDate>
    <dc:creator>Raghu_Bindingan</dc:creator>
    <dc:date>2023-04-13T18:11:03Z</dc:date>
    <item>
      <title>SQL Merge Statement not working</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-merge-statement-not-working/m-p/5970#M2227</link>
      <description>&lt;P&gt;Hi I am trying to use the SQL Merge statement on databricks&lt;/P&gt;&lt;P&gt;MERGE INTO target&lt;/P&gt;&lt;P&gt;USING source&lt;/P&gt;&lt;P&gt;ON source.key = target.key&lt;/P&gt;&lt;P&gt;WHEN MATCHED&lt;/P&gt;&lt;P&gt;  UPDATE SET *&lt;/P&gt;&lt;P&gt;WHEN NOT MATCHED&lt;/P&gt;&lt;P&gt;  INSERT *&lt;/P&gt;&lt;P&gt;WHEN NOT MATCHED BY SOURCE&lt;/P&gt;&lt;P&gt;  DELETE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is failing with the error [PARSE_SYNTAX_ERROR] Syntax error at or near 'UPDATE'.(line 18, pos 2).  I am running my notebook on a cluster that is running Databricks 12.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 14:18:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-merge-statement-not-working/m-p/5970#M2227</guid>
      <dc:creator>Raghu_Bindingan</dc:creator>
      <dc:date>2023-04-12T14:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Merge Statement not working</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-merge-statement-not-working/m-p/5971#M2228</link>
      <description>&lt;P&gt;Are you using the wildcard for the Update and insert ?&lt;/P&gt;&lt;P&gt;#DAIS2023&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 10:10:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-merge-statement-not-working/m-p/5971#M2228</guid>
      <dc:creator>UmaMahesh1</dc:creator>
      <dc:date>2023-04-13T10:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Merge Statement not working</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-merge-statement-not-working/m-p/5972#M2229</link>
      <description>&lt;P&gt;I was missing the THEN before UPDATE, INSERT and DELETE. This keyword is missing from the documentation on Databricks &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/delta/merge" target="test_blank"&gt;https://learn.microsoft.com/en-us/azure/databricks/delta/merge&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It now works. Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 18:11:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-merge-statement-not-working/m-p/5972#M2229</guid>
      <dc:creator>Raghu_Bindingan</dc:creator>
      <dc:date>2023-04-13T18:11:03Z</dc:date>
    </item>
  </channel>
</rss>

