<?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 charindex function? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/sql-charindex-function/m-p/27704#M19565</link>
    <description>&lt;P&gt;Thanks for trying @jconno​&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I need to be able to specify the position where the search for the character needs to start. So just finding the first occurrence of the character is not going to help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Dec 2019 05:06:03 GMT</pubDate>
    <dc:creator>Barb</dc:creator>
    <dc:date>2019-12-30T05:06:03Z</dc:date>
    <item>
      <title>SQL charindex function?</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-charindex-function/m-p/27700#M19561</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;I need to use the SQL charindex function, but I'm getting a databricks error that this doesn't exist. That can't be true, right? &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;Thanks for any ideas about how to make this work!&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;Barb 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 16:05:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-charindex-function/m-p/27700#M19561</guid>
      <dc:creator>Barb</dc:creator>
      <dc:date>2019-10-07T16:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: SQL charindex function?</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-charindex-function/m-p/27701#M19562</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi @Barb Krienke, Please use %sql in Databricks notebook cell.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;%sql
SELECT CHARINDEX('mer', 'Customer', 3) AS MatchPosition;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Oct 2019 16:28:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-charindex-function/m-p/27701#M19562</guid>
      <dc:creator>shyam_9</dc:creator>
      <dc:date>2019-10-07T16:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: SQL charindex function?</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-charindex-function/m-p/27702#M19563</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;%sql&lt;/P&gt;
&lt;P&gt;--The closest thing I found was instr()&lt;/P&gt;
&lt;P&gt;SELECT instr(Attribute, 'MatchString')&lt;/P&gt;
&lt;P&gt;FROM TableA tba&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 03:10:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-charindex-function/m-p/27702#M19563</guid>
      <dc:creator>jconno</dc:creator>
      <dc:date>2019-10-15T03:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: SQL charindex function?</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-charindex-function/m-p/27703#M19564</link>
      <description>&lt;P&gt;Hi @Shyamprasad Miryala​&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added %sql to the notebook cell and it did not work.&lt;/P&gt;&lt;P&gt;Were you able to get it to work in Databricks?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2019 05:04:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-charindex-function/m-p/27703#M19564</guid>
      <dc:creator>Barb</dc:creator>
      <dc:date>2019-12-30T05:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: SQL charindex function?</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-charindex-function/m-p/27704#M19565</link>
      <description>&lt;P&gt;Thanks for trying @jconno​&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I need to be able to specify the position where the search for the character needs to start. So just finding the first occurrence of the character is not going to help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2019 05:06:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-charindex-function/m-p/27704#M19565</guid>
      <dc:creator>Barb</dc:creator>
      <dc:date>2019-12-30T05:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: SQL charindex function?</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-charindex-function/m-p/27705#M19566</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi @bkrienke, &lt;/P&gt;
&lt;P&gt;It may usefull.&lt;/P&gt;
&lt;P&gt;%sql&lt;/P&gt;
&lt;P&gt;SELECT position('bar', 'foobarbar', 5); &lt;/P&gt;
&lt;P&gt;-- 7&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 03:48:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-charindex-function/m-p/27705#M19566</guid>
      <dc:creator>RAJUMASARAPU</dc:creator>
      <dc:date>2020-03-05T03:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: SQL charindex function?</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-charindex-function/m-p/27706#M19567</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;The best option I found to replace CHARINDEX was LOCATE, examples from the Spark documentation below&lt;/P&gt;
&lt;P&gt;&amp;gt; SELECT locate('bar', 'foobarbar', 5);&lt;/P&gt;
&lt;P&gt; 7 &lt;/P&gt;
&lt;P&gt;&amp;gt; SELECT POSITION('bar' IN 'foobarbar'); &lt;/P&gt;
&lt;P&gt; 4&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 05:14:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-charindex-function/m-p/27706#M19567</guid>
      <dc:creator>Traveller</dc:creator>
      <dc:date>2020-10-14T05:14:32Z</dc:date>
    </item>
  </channel>
</rss>

