<?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: How to join string lists in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641135#M234870</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you found the simplest solution (although it's memory-hungry)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other solution I can think of involves reordering key values (using substring() and concat()) to a common (ascending) format, but that means more code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jun 2014 16:40:26 GMT</pubDate>
    <dc:creator>Peter_Cammaert</dc:creator>
    <dc:date>2014-06-05T16:40:26Z</dc:date>
    <item>
      <title>How to join string lists</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641133#M234868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 tables A and B with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A: Field1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B: Field1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field1 contains a number list as value, such as '1:2:3:4:5' or '2:4:6' etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joins should match if number lists contain identical numbers and have identical length. E.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A.Field1 = '1:2:3:4:5' joins with B.Field1 = '1:3;2:4:5' but not with '2:4:6' or '1:3;2:4:5:5'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx - Marcel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 15:03:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641133#M234868</guid>
      <dc:creator>hugmarcel</dc:creator>
      <dc:date>2014-06-05T15:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to join string lists</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641134#M234869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found a solution, such as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.) Table C: Contains outer Join of Tables A and B (with FIELD1 renamed to FIELD2) .&lt;/P&gt;&lt;P&gt;2.) Reduce Table C to records fullfilling condition: &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LEN&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;PURGECHAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(FIELD1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FIELD2&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) + LEN&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;PURGECHAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(FIELD2&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FIELD1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&lt;/SPAN&gt; = 0 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;LEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(FIELD1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;LEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(FIELD2&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;However, I hope there is a better solution, as OUTER Joining is not nice.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thx - Marcel&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 15:49:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641134#M234869</guid>
      <dc:creator>hugmarcel</dc:creator>
      <dc:date>2014-06-05T15:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to join string lists</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641135#M234870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you found the simplest solution (although it's memory-hungry)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other solution I can think of involves reordering key values (using substring() and concat()) to a common (ascending) format, but that means more code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 16:40:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641135#M234870</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-06-05T16:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Re: How to join string lists</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641136#M234871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Small example of an alternative approach. Note that I used semicolons instead of colons. QlikView may mess with your key values if it thinks that they can be treated as time specifications (especially the shorter ones).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2014 13:31:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641136#M234871</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-06-06T13:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Re: How to join string lists</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641137#M234872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for this solution!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not like the outer join method, and I always try to keep coding as small and concise as possible. I therefore created a sub&lt;/P&gt;&lt;P&gt;which appends a new sorted field theFieldSorted to the table. Joining over sorted fields then gives correct matches too. See&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Sort field theTable.theField with theDelimiter, create new field theFieldSorted&lt;/P&gt;&lt;P&gt;SUB SortField ( theTable, theField, theDelimiter, theFieldSorted );&lt;/P&gt;&lt;P&gt; FIELD_ELEMENTS: &lt;/P&gt;&lt;P&gt; LOAD $(theField), SUBFIELD($(theField),'$(theDelimiter)') AS ELEMENTS&lt;/P&gt;&lt;P&gt; RESIDENT $(theTable);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; LEFT JOIN ($(theTable))&lt;/P&gt;&lt;P&gt; LOAD $(theField), CONCAT(ELEMENTS,'$(theDelimiter)') AS $(theFieldSorted) &lt;/P&gt;&lt;P&gt; RESIDENT FIELD_ELEMENTS&lt;/P&gt;&lt;P&gt; GROUP BY $(theField);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DROP TABLE FIELD_ELEMENTS;&lt;/P&gt;&lt;P&gt;END SUB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx - Marcel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2014 14:41:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641137#M234872</guid>
      <dc:creator>hugmarcel</dc:creator>
      <dc:date>2014-06-06T14:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to join string lists</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641138#M234873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one possible solution could be also:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14020987201489204" jivemacro_uid="_14020987201489204"&gt;
&lt;P&gt;QUALIFY 'Field*';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;FOR Each vtab in 'A', 'B'&lt;/P&gt;
&lt;P&gt;&amp;nbsp; $(vtab):&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD AutoNumber(Concat(F1, ':')) as %Field1ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field1,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field3&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Group By Field1, Field2, Field3, RecNo;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(Replace(Field1, ';', ':'), ':') as F1,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RecNo() as RecNo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; FROM [&lt;/SPAN&gt;&lt;A class="" data-containerid="-1" data-containertype="-1" data-objectid="110059" data-objecttype="13" href="http://community.qlik.com/servlet/JiveServlet/download/2051-121005-543866-110059/QlikCommunity_Thread_121005.xlsx"&gt;http://community.qlik.com/servlet/JiveServlet/download/543866-110059/QlikCommunity_Thread_121005.xlsx&lt;/A&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (ooxml, embedded labels, table is $(vtab));&lt;/P&gt;
&lt;P&gt;NEXT;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="60271" alt="QlikCommunity_Thread_121005_Pic3.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/60271_QlikCommunity_Thread_121005_Pic3.JPG.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="60269" alt="QlikCommunity_Thread_121005_Pic1.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/60269_QlikCommunity_Thread_121005_Pic1.JPG.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="60270" alt="QlikCommunity_Thread_121005_Pic2.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/60270_QlikCommunity_Thread_121005_Pic2.JPG.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2014 23:44:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641138#M234873</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-06-06T23:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Re: How to join string lists</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641139#M234874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Replacing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_14020996226717827 jive_macro_code" jivemacro_uid="_14020996226717827"&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;LOAD AutoNumber(Concat(F1, ':')) as %Field1ID,&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14020996539927908" jivemacro_uid="_14020996539927908"&gt;
&lt;P&gt;LOAD Concat(F1, ':') as %Field1ID,&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in my previously mentioned solution delivers a normalized key value:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_121005_Pic4.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/60272_QlikCommunity_Thread_121005_Pic4.JPG.jpg" /&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 00:14:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641139#M234874</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-06-07T00:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to join string lists</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641140#M234875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And this is even shorter. I think you'll like it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Sort field theTable.theField with theDelimiter, create new field theFieldSorted&lt;/P&gt;&lt;P&gt;SUB SortField ( theTable, theField, theDelimiter, theFieldSorted );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; LEFT JOIN ($(theTable))&lt;/P&gt;&lt;P&gt; LOAD $(theField), CONCAT(ELEMENTS,'$(theDelimiter)') AS $(theFieldSorted) GROUP BY $(theField);&lt;/P&gt;&lt;P&gt; LOAD $(theField), SUBFIELD($(theField),'$(theDelimiter)') AS ELEMENTS&lt;/P&gt;&lt;P&gt; RESIDENT $(theTable);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;END SUB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you're satisfied, please close the thread. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 08:59:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641140#M234875</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-06-10T08:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to join string lists</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641141#M234876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YES &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i like it, although there are other possible solutions as i.e. mentioned below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 14:22:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-join-string-lists/m-p/641141#M234876</guid>
      <dc:creator>hugmarcel</dc:creator>
      <dc:date>2014-06-24T14:22:52Z</dc:date>
    </item>
  </channel>
</rss>

