<?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: SET a parameter in BEGIN END statement in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/set-a-parameter-in-begin-end-statement/m-p/122494#M46794</link>
    <description>&lt;P&gt;Hello, thanks for the reply. Yes, it is possible to execute the statement outside the block, but I wanted to make sure there wasn't a special syntax so that the block doesn't consider the parameter as a variable. We'll wait for an update to define parameters inside a begin...end block. There was SET VAR before SQL scripting possibilities. Maybe a SET PARAM inside a block.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jun 2025 06:46:42 GMT</pubDate>
    <dc:creator>oneill</dc:creator>
    <dc:date>2025-06-23T06:46:42Z</dc:date>
    <item>
      <title>SET a parameter in BEGIN END statement</title>
      <link>https://community.databricks.com/t5/data-engineering/set-a-parameter-in-begin-end-statement/m-p/122472#M46784</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;How to set a parameter in a begin end statement. for exemple the following query fails :&amp;nbsp;&lt;/P&gt;&lt;P&gt;begin&lt;/P&gt;&lt;P&gt;SET ansi_mode = true;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;with&amp;nbsp;Cannot resolve variable `ANSI_MODE` on search path `SYSTEM`.`SESSION`. SQLSTATE: 42883&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jun 2025 17:37:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/set-a-parameter-in-begin-end-statement/m-p/122472#M46784</guid>
      <dc:creator>oneill</dc:creator>
      <dc:date>2025-06-22T17:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: SET a parameter in BEGIN END statement</title>
      <link>https://community.databricks.com/t5/data-engineering/set-a-parameter-in-begin-end-statement/m-p/122488#M46791</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/164896"&gt;@oneill&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is currently no supported workaround to dynamically change system/session parameters such as ansi_mode within a BEGIN ... END block in Databricks SQL procedures or scripts. Can you set these parameters before executing any procedural logic.&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;SET ANSI_MODE = true;&lt;BR /&gt;BEGIN &lt;BR /&gt;&amp;nbsp; -- procedural code here &lt;BR /&gt;END;&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 Jun 2025 05:42:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/set-a-parameter-in-begin-end-statement/m-p/122488#M46791</guid>
      <dc:creator>Vinay_M_R</dc:creator>
      <dc:date>2025-06-23T05:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: SET a parameter in BEGIN END statement</title>
      <link>https://community.databricks.com/t5/data-engineering/set-a-parameter-in-begin-end-statement/m-p/122494#M46794</link>
      <description>&lt;P&gt;Hello, thanks for the reply. Yes, it is possible to execute the statement outside the block, but I wanted to make sure there wasn't a special syntax so that the block doesn't consider the parameter as a variable. We'll wait for an update to define parameters inside a begin...end block. There was SET VAR before SQL scripting possibilities. Maybe a SET PARAM inside a block.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 06:46:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/set-a-parameter-in-begin-end-statement/m-p/122494#M46794</guid>
      <dc:creator>oneill</dc:creator>
      <dc:date>2025-06-23T06:46:42Z</dc:date>
    </item>
  </channel>
</rss>

