<?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: Inner Join TableA.ColumnA to TableB.ColumnB where A is an integer contained in B in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Inner-Join-TableA-ColumnA-to-TableB-ColumnB-where-A-is-an/m-p/302326#M707661</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is TableB has ID column, or is there any way to bring ID column In SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is possible then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TableA:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;id;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT DISTINCT(id) FROM TableA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER Join&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT nameOfBatch, id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM TableB;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Feb 2012 08:06:00 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2012-02-21T08:06:00Z</dc:date>
    <item>
      <title>Inner Join TableA.ColumnA to TableB.ColumnB where A is an integer contained in B</title>
      <link>https://community.qlik.com/t5/QlikView/Inner-Join-TableA-ColumnA-to-TableB-ColumnB-where-A-is-an/m-p/302325#M707660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry if the subject is not particuarly clear, I have two tables (for purposes of illustration):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;id&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;123456&lt;/P&gt;&lt;P&gt;789101&lt;/P&gt;&lt;P&gt;112131&lt;/P&gt;&lt;P&gt;415161&lt;/P&gt;&lt;P&gt;718192&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nameOfBatch&lt;/P&gt;&lt;P&gt;---------------------------------------&lt;/P&gt;&lt;P&gt;SOMETHING_123456_SOMETHING&lt;/P&gt;&lt;P&gt;OTHER_789101&lt;/P&gt;&lt;P&gt;FOO_112131_BAR&lt;/P&gt;&lt;P&gt;415161_BAR&lt;/P&gt;&lt;P&gt;FOOBAR_718192_FOO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to inner join these two tables, so i was thinking where nameOfBatch = '%id%' - it's imperfect but is good enough for the stats i'm after&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I express this join in Qlikview? I've tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LogsEditedJob:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;id;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT DISTINCT(id) FROM TableA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LogsEditedJob2: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER Join&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT nameOfBatch&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FROM TableB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;WHERE nameOfBatch LIKE '%' + id + '%'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.. This throws an error saying 'id' can't be found - so i'm referencing it wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 07:56:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inner-Join-TableA-ColumnA-to-TableB-ColumnB-where-A-is-an/m-p/302325#M707660</guid>
      <dc:creator />
      <dc:date>2012-02-21T07:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join TableA.ColumnA to TableB.ColumnB where A is an integer contained in B</title>
      <link>https://community.qlik.com/t5/QlikView/Inner-Join-TableA-ColumnA-to-TableB-ColumnB-where-A-is-an/m-p/302326#M707661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is TableB has ID column, or is there any way to bring ID column In SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is possible then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TableA:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;id;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT DISTINCT(id) FROM TableA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER Join&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT nameOfBatch, id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM TableB;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 08:06:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inner-Join-TableA-ColumnA-to-TableB-ColumnB-where-A-is-an/m-p/302326#M707661</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-02-21T08:06:00Z</dc:date>
    </item>
    <item>
      <title>Inner Join TableA.ColumnA to TableB.ColumnB where A is an integer contained in B</title>
      <link>https://community.qlik.com/t5/QlikView/Inner-Join-TableA-ColumnA-to-TableB-ColumnB-where-A-is-an/m-p/302327#M707662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No sadly not, that would have made things too easy! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/shocked.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 08:07:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inner-Join-TableA-ColumnA-to-TableB-ColumnB-where-A-is-an/m-p/302327#M707662</guid>
      <dc:creator />
      <dc:date>2012-02-21T08:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join TableA.ColumnA to TableB.ColumnB where A is an integer contained in B</title>
      <link>https://community.qlik.com/t5/QlikView/Inner-Join-TableA-ColumnA-to-TableB-ColumnB-where-A-is-an/m-p/302328#M707663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this the exact BatchNames, each having different format, one has ID at the beginning, other has ID in between the words and other has at the end.&amp;nbsp; Each of them having different format.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOMETHING_123456_SOMETHING&lt;/P&gt;&lt;P&gt;OTHER_789101&lt;/P&gt;&lt;P&gt;FOO_112131_BAR&lt;/P&gt;&lt;P&gt;415161_BAR&lt;/P&gt;&lt;P&gt;FOOBAR_718192_FOO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 08:13:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inner-Join-TableA-ColumnA-to-TableB-ColumnB-where-A-is-an/m-p/302328#M707663</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-02-21T08:13:31Z</dc:date>
    </item>
    <item>
      <title>Inner Join TableA.ColumnA to TableB.ColumnB where A is an integer contained in B</title>
      <link>https://community.qlik.com/t5/QlikView/Inner-Join-TableA-ColumnA-to-TableB-ColumnB-where-A-is-an/m-p/302329#M707664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is, this is why I decided to use '%'+id+'%' rather than '%_' + id + '_%' - even without the underscores it's suitably unique for my purposes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 08:14:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inner-Join-TableA-ColumnA-to-TableB-ColumnB-where-A-is-an/m-p/302329#M707664</guid>
      <dc:creator />
      <dc:date>2012-02-21T08:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join TableA.ColumnA to TableB.ColumnB where A is an integer contained in B</title>
      <link>https://community.qlik.com/t5/QlikView/Inner-Join-TableA-ColumnA-to-TableB-ColumnB-where-A-is-an/m-p/302330#M707665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi, in QlikView I would do it like this:&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/SPAN&gt;&lt;DIV&gt;t1:&lt;BR /&gt;&lt;DIV&gt;LOAD * INLINE [&lt;/DIV&gt;nameOfBatch&lt;BR /&gt; SOMETHING_123456_SOMETHING&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; OTHER_789101&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; FOO_112131_BAR&lt;BR /&gt; 415161_BAR&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; FOOBAR_718192_FOO&lt;BR /&gt;];&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;LJ_table:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; id&lt;BR /&gt; 123456&lt;BR /&gt; 789101&amp;nbsp;&amp;nbsp; &lt;BR /&gt; 112131 &lt;BR /&gt; 415161&amp;nbsp; &lt;BR /&gt; 718192&lt;BR /&gt;];&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;// create Cross join (if there is not too much data)&lt;/DIV&gt;&lt;DIV&gt;Left Join (t1)&lt;BR /&gt;Load id as id2&lt;BR /&gt;Resident LJ_table;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;// load just the ones that have id inside.&lt;BR /&gt;t2:&lt;BR /&gt;Noconcatenate Load &lt;BR /&gt;nameOfBatch as t2.nameOfBatch,&lt;BR /&gt;id2 as t2.id2&lt;BR /&gt;Resident t1&lt;BR /&gt;Where WildMatch(nameOfBatch, '*' &amp;amp; id2 &amp;amp; '*') &amp;gt; 0;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 08:33:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inner-Join-TableA-ColumnA-to-TableB-ColumnB-where-A-is-an/m-p/302330#M707665</guid>
      <dc:creator />
      <dc:date>2012-02-21T08:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join TableA.ColumnA to TableB.ColumnB where A is an integer contained in B</title>
      <link>https://community.qlik.com/t5/QlikView/Inner-Join-TableA-ColumnA-to-TableB-ColumnB-where-A-is-an/m-p/302331#M707666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not bad, thanks for that - i'd love if there was a more efficient method anyone could recommend although with the size of my data this is viable for the moment&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 08:36:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inner-Join-TableA-ColumnA-to-TableB-ColumnB-where-A-is-an/m-p/302331#M707666</guid>
      <dc:creator />
      <dc:date>2012-02-21T08:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join TableA.ColumnA to TableB.ColumnB where A is an integer contained in B</title>
      <link>https://community.qlik.com/t5/QlikView/Inner-Join-TableA-ColumnA-to-TableB-ColumnB-where-A-is-an/m-p/302332#M707667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; With more and more data... you'll have to load the data in steps (look below). The seq field is just for help in which load we get the data... Substring counts number of '_', IsNum() differentiates if it's OTHER_789101 or 415161_BAR.&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; nameOfBatch&lt;BR /&gt; SOMETHING_123456_SOMETHING&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; OTHER_789101&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; FOO_112131_BAR&lt;BR /&gt; 415161_BAR&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; FOOBAR_718192_FOO&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;t2_tmp:&lt;BR /&gt;NoConcatenate load&lt;BR /&gt;nameOfBatch,&lt;BR /&gt;subfield(nameOfBatch, '_', 1) AS id,&lt;BR /&gt;1 as seq&lt;BR /&gt;Resident t1&lt;BR /&gt;Where &lt;BR /&gt;SubStringCount(nameOfBatch, '_') = 1&lt;BR /&gt;And IsNum(subfield(nameOfBatch, '_', 1))&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;load&lt;BR /&gt;nameOfBatch,&lt;BR /&gt;subfield(nameOfBatch, '_',2) AS id,&lt;BR /&gt;2 as seq&lt;BR /&gt;Resident t1&lt;BR /&gt;Where &lt;BR /&gt;SubStringCount(nameOfBatch, '_') = 1&lt;BR /&gt;And IsNum(subfield(nameOfBatch, '_', 2));&lt;/P&gt;&lt;P&gt;load&lt;BR /&gt;nameOfBatch,&lt;BR /&gt;subfield(subfield(nameOfBatch, '_', 2), '_', 1) AS id,&lt;BR /&gt;3 as seq&lt;BR /&gt;Resident t1&lt;BR /&gt;Where &lt;BR /&gt;SubStringCount(nameOfBatch, '_') &amp;gt;= 2&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;drop table t1;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Left Join(t2_tmp)&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; id, id_desc&lt;BR /&gt; 123456, 1&lt;BR /&gt; 789101, 2&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; 112131, 3&amp;nbsp;&amp;nbsp; &lt;BR /&gt; 415161, 4&amp;nbsp;&amp;nbsp; &lt;BR /&gt; 718192, 5&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Miha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 08:54:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inner-Join-TableA-ColumnA-to-TableB-ColumnB-where-A-is-an/m-p/302332#M707667</guid>
      <dc:creator />
      <dc:date>2012-02-21T08:54:23Z</dc:date>
    </item>
  </channel>
</rss>

