<?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 Need help splitting a field using the first delimiter from the right. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-splitting-a-field-using-the-first-delimiter-from-the/m-p/721473#M677103</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been using the script below to split a field into two:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Index(AccountTemp,' ')=0,Null(),SubField(AccountTemp,' ',1))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS Account,&lt;/P&gt;&lt;P&gt;If(Index(AccountTemp,' ')=0,AccountTemp,SubField(AccountTemp,' ',2))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS AccountGroup,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which works for:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Denver Admin ---&amp;gt; Denver,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Admin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But doesn't work for:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Washington DC Admin -------&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Washington,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DC,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Admin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to split a field using the first space in the data from the right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jun 2014 17:40:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-06-20T17:40:10Z</dc:date>
    <item>
      <title>Need help splitting a field using the first delimiter from the right.</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-splitting-a-field-using-the-first-delimiter-from-the/m-p/721473#M677103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been using the script below to split a field into two:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Index(AccountTemp,' ')=0,Null(),SubField(AccountTemp,' ',1))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS Account,&lt;/P&gt;&lt;P&gt;If(Index(AccountTemp,' ')=0,AccountTemp,SubField(AccountTemp,' ',2))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS AccountGroup,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which works for:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Denver Admin ---&amp;gt; Denver,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Admin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But doesn't work for:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Washington DC Admin -------&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Washington,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DC,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Admin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to split a field using the first space in the data from the right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 17:40:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-splitting-a-field-using-the-first-delimiter-from-the/m-p/721473#M677103</guid>
      <dc:creator />
      <dc:date>2014-06-20T17:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Need help splitting a field using the first delimiter from the right.</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-splitting-a-field-using-the-first-delimiter-from-the/m-p/721474#M677104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the right, use &lt;STRONG&gt;-1&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 17:45:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-splitting-a-field-using-the-first-delimiter-from-the/m-p/721474#M677104</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-20T17:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Need help splitting a field using the first delimiter from the right.</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-splitting-a-field-using-the-first-delimiter-from-the/m-p/721475#M677105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Trey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Left(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;AccountTemp&lt;/SPAN&gt;, Index(AccountTemp, ' ', -1) - 1)&amp;nbsp;&amp;nbsp;&amp;nbsp; as Account,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Mid(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;AccountTemp&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;, Index(AccountTemp, ' ', -1) + 1)&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; as AccountGroup,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Index() with a -1 third parameter finds the first occurrence of the substring from the right.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 17:53:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-splitting-a-field-using-the-first-delimiter-from-the/m-p/721475#M677105</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-20T17:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need help splitting a field using the first delimiter from the right.</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-splitting-a-field-using-the-first-delimiter-from-the/m-p/721476#M677106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Bruno, that worked!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 17:57:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-splitting-a-field-using-the-first-delimiter-from-the/m-p/721476#M677106</guid>
      <dc:creator />
      <dc:date>2014-06-20T17:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need help splitting a field using the first delimiter from the right.</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-splitting-a-field-using-the-first-delimiter-from-the/m-p/721477#M677107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Trey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly Try Like this .. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; AccountTemp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Denver Admin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Washington DC Admin&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;left( AccountTemp,index(AccountTemp,' ',-1))as Account,&lt;/P&gt;&lt;P&gt;Right(AccountTemp,len(AccountTemp)-index(AccountTemp,' ',-1))as AccountGroup&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Resident Test;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table Test;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 18:16:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-splitting-a-field-using-the-first-delimiter-from-the/m-p/721477#M677107</guid>
      <dc:creator />
      <dc:date>2014-06-20T18:16:47Z</dc:date>
    </item>
  </channel>
</rss>

