<?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 Multiple conditions in tMap inner join in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Multiple-conditions-in-tMap-inner-join/m-p/2274955#M51474</link>
    <description>&lt;P&gt;good morning Community!&amp;nbsp; I'm looking for a little assistance on this tMap inner join criteria.&amp;nbsp; Basically it does this: if the ID field is equal between 2 tables AND the IntergerField is equal, then the join is True.&amp;nbsp; However, matching on the IntegerField requires a CASE statement: if the IntegerField is NULL and has a certain description, then return one of two values (888888 or 999999), else return the actual IntergerField value&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;table1.id=table2.id&lt;BR /&gt;AND CASE&lt;BR /&gt;WHEN table1.&lt;SPAN&gt;integerfield&amp;nbsp;&lt;/SPAN&gt;IS NULL AND table1.textfield='VALUE1' THEN 999999&lt;BR /&gt;WHEN&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;table1.&lt;/SPAN&gt;&lt;SPAN&gt;integerfield&amp;nbsp;&lt;/SPAN&gt;IS NULL AND&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;table1.&lt;/SPAN&gt;&lt;SPAN&gt;textfield&lt;/SPAN&gt;='VALUE2' THEN 888888&lt;BR /&gt;ELSE&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;table1.integerfield&lt;/SPAN&gt;&lt;BR /&gt;END = table2.integerfield&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Any help is greatly appreciated!&amp;nbsp; thanks&lt;/P&gt; 
&lt;P&gt;Brad&lt;/P&gt;</description>
    <pubDate>Mon, 22 Oct 2018 16:52:55 GMT</pubDate>
    <dc:creator>bradsheridan</dc:creator>
    <dc:date>2018-10-22T16:52:55Z</dc:date>
    <item>
      <title>Multiple conditions in tMap inner join</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Multiple-conditions-in-tMap-inner-join/m-p/2274955#M51474</link>
      <description>&lt;P&gt;good morning Community!&amp;nbsp; I'm looking for a little assistance on this tMap inner join criteria.&amp;nbsp; Basically it does this: if the ID field is equal between 2 tables AND the IntergerField is equal, then the join is True.&amp;nbsp; However, matching on the IntegerField requires a CASE statement: if the IntegerField is NULL and has a certain description, then return one of two values (888888 or 999999), else return the actual IntergerField value&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;table1.id=table2.id&lt;BR /&gt;AND CASE&lt;BR /&gt;WHEN table1.&lt;SPAN&gt;integerfield&amp;nbsp;&lt;/SPAN&gt;IS NULL AND table1.textfield='VALUE1' THEN 999999&lt;BR /&gt;WHEN&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;table1.&lt;/SPAN&gt;&lt;SPAN&gt;integerfield&amp;nbsp;&lt;/SPAN&gt;IS NULL AND&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;table1.&lt;/SPAN&gt;&lt;SPAN&gt;textfield&lt;/SPAN&gt;='VALUE2' THEN 888888&lt;BR /&gt;ELSE&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;table1.integerfield&lt;/SPAN&gt;&lt;BR /&gt;END = table2.integerfield&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Any help is greatly appreciated!&amp;nbsp; thanks&lt;/P&gt; 
&lt;P&gt;Brad&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 16:52:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Multiple-conditions-in-tMap-inner-join/m-p/2274955#M51474</guid>
      <dc:creator>bradsheridan</dc:creator>
      <dc:date>2018-10-22T16:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple conditions in tMap inner join</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Multiple-conditions-in-tMap-inner-join/m-p/2274956#M51475</link>
      <description>&lt;P&gt;nevermind...figured it out&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 18:26:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Multiple-conditions-in-tMap-inner-join/m-p/2274956#M51475</guid>
      <dc:creator>bradsheridan</dc:creator>
      <dc:date>2018-10-22T18:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple conditions in tMap inner join</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Multiple-conditions-in-tMap-inner-join/m-p/2274957#M51476</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Thanks for letting us know that you have fixed this issue by yourself. We will appreciate it if you could post your solution here.&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 04:01:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Multiple-conditions-in-tMap-inner-join/m-p/2274957#M51476</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-23T04:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple conditions in tMap inner join</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Multiple-conditions-in-tMap-inner-join/m-p/2274958#M51477</link>
      <description>&lt;P&gt;&lt;SPAN&gt;So here is the solution that worked for me.&amp;nbsp; I realized that I was trying to do all of the logic on just 1 field join between 2 tables when in fact, it really needed to be separated.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Originally&lt;SPAN&gt;&amp;nbsp;in the Inner Join between table1 and table2, I put the following logic in the join expression on the ID field:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;table1.id=table2.id&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AND CASE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;WHEN table1.&lt;/SPAN&gt;&lt;SPAN&gt;integerfield&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;IS NULL AND table1.textfield='VALUE1' THEN 999999&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;WHEN&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;table1.&lt;/SPAN&gt;&lt;SPAN&gt;integerfield&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;IS NULL AND&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;table1.&lt;/SPAN&gt;&lt;SPAN&gt;textfield&lt;/SPAN&gt;&lt;SPAN&gt;='VALUE2' THEN 888888&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ELSE&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;table1.integerfield&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;END = table2.integerfield&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;What I ended up doing after thinking more about it was this:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;on the join expression for the ID field:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;table1.id=table2.id (Simply drag and drop the ID field from table1 down to table2)&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;on the join expression for the integerfield:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN&gt;table1.textfield&lt;/SPAN&gt;&lt;SPAN&gt;.equals("&lt;/SPAN&gt;&lt;SPAN&gt;VALUE1")?999999:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;table1.textfield&lt;/SPAN&gt;&lt;SPAN&gt;.equals("&lt;/SPAN&gt;&lt;SPAN&gt;VALUE2")?888888:table2.integerfield&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN&gt;What I left out of my original code was to check for NULL values in the integerfield.&amp;nbsp; I did this because 1) it was redundant and 2) I couldn't figure out how to do it in my Talend expression &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; . (suggestions are still welcome)&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 12:49:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Multiple-conditions-in-tMap-inner-join/m-p/2274958#M51477</guid>
      <dc:creator>bradsheridan</dc:creator>
      <dc:date>2018-10-23T12:49:26Z</dc:date>
    </item>
  </channel>
</rss>

