<?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: Function in databricks in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/function-in-databricks/m-p/4078#M902</link>
    <description>&lt;P&gt;Hi @Givi Salu​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;Please refer to &lt;A href="https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-create-sql-function.html" alt="https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-create-sql-function.html" target="_blank"&gt;this link&lt;/A&gt; that will help you convert this function.&lt;/P&gt;</description>
    <pubDate>Tue, 23 May 2023 13:38:49 GMT</pubDate>
    <dc:creator>Ajay-Pandey</dc:creator>
    <dc:date>2023-05-23T13:38:49Z</dc:date>
    <item>
      <title>Function in databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/function-in-databricks/m-p/4077#M901</link>
      <description>&lt;P&gt;Im having a hard time to convert below function from SSMS to databricks function. Any help would be appreciated! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CREATE FUNCTION [dbo].[MaxOf5Values] (@D1 [int],@D2 [int],@D3 [int],@D4 [int],@D5 [int]) RETURNS int
AS
BEGIN
    DECLARE @Result int
&amp;nbsp;
    SET @Result = COALESCE(@D1, @D2, @D3, @D4, @D5)
&amp;nbsp;
    IF @D2 IS NOT NULL AND @D2 &amp;gt; @Result SET @Result = @D2
    IF @D3 IS NOT NULL AND @D3 &amp;gt; @Result SET @Result = @D3
    IF @D4 IS NOT NULL AND @D4 &amp;gt; @Result SET @Result = @D4
    IF @D5 IS NOT NULL AND @D5 &amp;gt; @Result SET @Result = @D5
&amp;nbsp;
    RETURN @Result
END&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2023 08:26:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/function-in-databricks/m-p/4077#M901</guid>
      <dc:creator>g96g</dc:creator>
      <dc:date>2023-05-23T08:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Function in databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/function-in-databricks/m-p/4078#M902</link>
      <description>&lt;P&gt;Hi @Givi Salu​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;Please refer to &lt;A href="https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-create-sql-function.html" alt="https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-create-sql-function.html" target="_blank"&gt;this link&lt;/A&gt; that will help you convert this function.&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2023 13:38:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/function-in-databricks/m-p/4078#M902</guid>
      <dc:creator>Ajay-Pandey</dc:creator>
      <dc:date>2023-05-23T13:38:49Z</dc:date>
    </item>
  </channel>
</rss>

