<?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 join problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/join-problem/m-p/633435#M232356</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;I have some issues getting my data joined and displayed correctly. I have attached a sample document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I have done so far (Steps are marked in the script):&lt;/P&gt;&lt;P&gt;1. Load the initial datasource&lt;BR /&gt;2. join the secondary datasource to get the Ext_CaseNumber&lt;BR /&gt;3. Drop the CaseNumber from initial data, so each case only has an Ext_Number&lt;BR /&gt;4/5/6. Load and Join more CaseNumbers to the initial datasource, but as I use Ext_Number&lt;BR /&gt;&amp;nbsp;&amp;nbsp; as the key I only get data joined on CaseNames that have a Ext_Number.This way, I&lt;BR /&gt;&amp;nbsp;&amp;nbsp; join CaseNumbers that don't exist in the initial datasource.&lt;BR /&gt;7. Join the CaseNumbers from the initial datasource back, so I'll have the CaseNumbers&lt;BR /&gt;&amp;nbsp;&amp;nbsp; without a Ext_CaseNumber again.&lt;BR /&gt;8. Load the data into a new table and remove CaseNames without a caseNumber&lt;BR /&gt;9. Join the CaseDates for those CaseNames that don't have an Ext_CaseNumber&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the field CaseNumber to contain every casenumber from the initial datasource and the casenumbers from the secondary datasource that have an Ext_CaseNumber that matches a CaseNumber from the first datasource. The problem is cases that don't have an Ext_CaseNumber (CaseName C in the sample). C should have a CaseNumber and CaseDate associated with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 May 2014 08:13:26 GMT</pubDate>
    <dc:creator>nicolai_moller</dc:creator>
    <dc:date>2014-05-30T08:13:26Z</dc:date>
    <item>
      <title>join problem</title>
      <link>https://community.qlik.com/t5/QlikView/join-problem/m-p/633435#M232356</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;I have some issues getting my data joined and displayed correctly. I have attached a sample document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I have done so far (Steps are marked in the script):&lt;/P&gt;&lt;P&gt;1. Load the initial datasource&lt;BR /&gt;2. join the secondary datasource to get the Ext_CaseNumber&lt;BR /&gt;3. Drop the CaseNumber from initial data, so each case only has an Ext_Number&lt;BR /&gt;4/5/6. Load and Join more CaseNumbers to the initial datasource, but as I use Ext_Number&lt;BR /&gt;&amp;nbsp;&amp;nbsp; as the key I only get data joined on CaseNames that have a Ext_Number.This way, I&lt;BR /&gt;&amp;nbsp;&amp;nbsp; join CaseNumbers that don't exist in the initial datasource.&lt;BR /&gt;7. Join the CaseNumbers from the initial datasource back, so I'll have the CaseNumbers&lt;BR /&gt;&amp;nbsp;&amp;nbsp; without a Ext_CaseNumber again.&lt;BR /&gt;8. Load the data into a new table and remove CaseNames without a caseNumber&lt;BR /&gt;9. Join the CaseDates for those CaseNames that don't have an Ext_CaseNumber&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the field CaseNumber to contain every casenumber from the initial datasource and the casenumbers from the secondary datasource that have an Ext_CaseNumber that matches a CaseNumber from the first datasource. The problem is cases that don't have an Ext_CaseNumber (CaseName C in the sample). C should have a CaseNumber and CaseDate associated with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 08:13:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/join-problem/m-p/633435#M232356</guid>
      <dc:creator>nicolai_moller</dc:creator>
      <dc:date>2014-05-30T08:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: join problem</title>
      <link>https://community.qlik.com/t5/QlikView/join-problem/m-p/633436#M232357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nicolai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;complicated procedure. But of course sometimes it must be complicated ....&lt;/P&gt;&lt;P&gt;Try to do one thing, because it will be easiest for you. I'am sure, you know exactly what result you expect after each of your steps. So, please comment your script after 2 step, reload and check, then uncoment 3'rd step reload and check, then do the same with 4'th step and so on. Try to find step which doesn't work as you expect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 08:35:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/join-problem/m-p/633436#M232357</guid>
      <dc:creator />
      <dc:date>2014-05-30T08:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: join problem</title>
      <link>https://community.qlik.com/t5/QlikView/join-problem/m-p/633437#M232358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's the last step that is giving me trouble. I want to join the date to CaseNumber C, by doing a left join, but nothing changes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 15:00:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/join-problem/m-p/633437#M232358</guid>
      <dc:creator>nicolai_moller</dc:creator>
      <dc:date>2014-05-30T15:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: join problem</title>
      <link>https://community.qlik.com/t5/QlikView/join-problem/m-p/633438#M232359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nicolai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem is, that you join CaseNumber and CaseDate to table where botf fields exists. Your row with casenumber = 0003 has casedate=null, this is why it doesn't meet join criteria.&lt;/P&gt;&lt;P&gt;You may try this script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Datasource1: //Step1&lt;/P&gt;&lt;P&gt;load * inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;CaseName,CaseNumber&lt;/P&gt;&lt;P&gt;A,0001&lt;/P&gt;&lt;P&gt;B,0002&lt;/P&gt;&lt;P&gt;C,0003&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Datasouce2: //Step2&lt;/P&gt;&lt;P&gt;left join (Datasource1)&lt;/P&gt;&lt;P&gt;load * inline &lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;CaseNumber,Ext_CaseNumber&lt;/P&gt;&lt;P&gt;0001,0001&lt;/P&gt;&lt;P&gt;0002,0002&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0004,0004&lt;/P&gt;&lt;P&gt;0005,0005&lt;/P&gt;&lt;P&gt;0006,0002&lt;/P&gt;&lt;P&gt;0007,0002&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop field CaseNumber; //Step3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date_tmp: //Step4 &lt;/P&gt;&lt;P&gt;load * inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;CaseNumber,Ext_CaseNumber,CaseDate&lt;/P&gt;&lt;P&gt;0001,0001,01-01-2001&lt;/P&gt;&lt;P&gt;0002,0002,02-02-2002&lt;/P&gt;&lt;P&gt;0004,0004,05-05-2005&lt;/P&gt;&lt;P&gt;0005,0005,06-06-2006&lt;/P&gt;&lt;P&gt;0006,0002,02-02-2002&lt;/P&gt;&lt;P&gt;0007,0002,07-07-2007&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;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate (Date_tmp) //Step5&lt;/P&gt;&lt;P&gt;load * inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;CaseNumber,CaseDate&lt;/P&gt;&lt;P&gt;0003,03-03-2003&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (Datasource1) //Step6&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;1 as A&lt;/P&gt;&lt;P&gt;Resident Date_tmp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Date_tmp; &lt;/P&gt;&lt;P&gt;drop field A;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;outer join (Datasource1) //Step7&lt;/P&gt;&lt;P&gt;load * inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;CaseName,CaseNumber&lt;/P&gt;&lt;P&gt;A,0001&lt;/P&gt;&lt;P&gt;B,0002&lt;/P&gt;&lt;P&gt;C,0003&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New_Table: //Step8&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;1 as DEL&lt;/P&gt;&lt;P&gt;resident Datasource1&lt;/P&gt;&lt;P&gt;where exists(CaseNumber);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Datasource1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;newTab1:&lt;/P&gt;&lt;P&gt;load * Resident New_Table where not Exists(CaseDate);&lt;/P&gt;&lt;P&gt;drop Field CaseDate from newTab1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;join (newTab1) //Step9&lt;/P&gt;&lt;P&gt;load * inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;CaseNumber,CaseDate&lt;/P&gt;&lt;P&gt;0003,03-03-2003&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 * Resident New_Table where Exists(CaseDate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table New_Table;&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;Darek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 20:13:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/join-problem/m-p/633438#M232359</guid>
      <dc:creator />
      <dc:date>2014-05-30T20:13:05Z</dc:date>
    </item>
  </channel>
</rss>

