<?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 implement a join with 'OR' condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986124#M952202</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elim,&lt;/P&gt;&lt;P&gt;First take full join of both tables.&lt;/P&gt;&lt;P&gt;after that take resident of that table and apply these condition in where condition. &lt;/P&gt;&lt;P&gt;Hope this will give you solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;RS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Nov 2015 06:27:34 GMT</pubDate>
    <dc:creator>raghvendrasingh</dc:creator>
    <dc:date>2015-11-26T06:27:34Z</dc:date>
    <item>
      <title>How to implement a join with 'OR' condition</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986122#M952200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know how to join two tables from 2 different database using either one of the critiera.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two tables that one is from in Oracle Database and the other is from SQL Server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oracle_Table&lt;/P&gt;&lt;P&gt;Call_ID,&lt;/P&gt;&lt;P&gt;Case_No,&lt;/P&gt;&lt;P&gt;Call_Time,&lt;/P&gt;&lt;P&gt;Oracle_Field_A,&lt;/P&gt;&lt;P&gt;Oracle_Field_B,&lt;/P&gt;&lt;P&gt;Oracle_Field_C,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL_Server_Table&lt;/P&gt;&lt;P&gt;Call_ID,&lt;/P&gt;&lt;P&gt;Case_No,&lt;/P&gt;&lt;P&gt;Call_Time,&lt;/P&gt;&lt;P&gt;SQLServer_Field_A,&lt;/P&gt;&lt;P&gt;SQLServer_Field_B,&lt;/P&gt;&lt;P&gt;SQLServer_Field_C,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call_ID, Call_No, and Call_Time are supposed to be the same between the two table. However, it is not happened.&amp;nbsp; Sometimes the Call_ID is missing from one of the table and sometimes they have the same ID but the Call_Time is slightly different. Also the Case_No is not a unique number, It is unique for the same date only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have implemented the following script in MS-ACCESS to join the two table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from Oracle_Table ORA&lt;/P&gt;&lt;P&gt;Left join SQL_Server_Table SQL on&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( ORA.Call_ID = SQL.Call_ID) OR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ORA.Case_No = SQL.Case_No and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int(ORA.Call_Time) = int(SQL.Call_Time)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know how to implement this join in Qlikview?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2015 01:16:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986122#M952200</guid>
      <dc:creator />
      <dc:date>2015-11-26T01:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement a join with 'OR' condition</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986123#M952201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;very simple in QV, just identify Primary Key and then:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Oracle_Table&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Call_ID,&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; //Assuming Call ID as primary key&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Case_No,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Call_Time,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Oracle_Field_A,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Oracle_Field_B,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Oracle_Field_C,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;...&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;left/Right/Outer/Inner(TableName)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL_Server_Table&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Call_ID,&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; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;//Assuming Call ID as primary key&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Case_No,&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; ////////Rename Case No and Call Time as they will create synthetic key.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Call_Time,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQLServer_Field_A,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQLServer_Field_B,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQLServer_Field_C,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;...&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;One more thing, for me it seems both the table have same data so you can&lt;STRONG&gt; Concatenate as well if this is the case.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Make sure while concatenation field name of both the tables should be same.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2015 06:11:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986123#M952201</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-26T06:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement a join with 'OR' condition</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986124#M952202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elim,&lt;/P&gt;&lt;P&gt;First take full join of both tables.&lt;/P&gt;&lt;P&gt;after that take resident of that table and apply these condition in where condition. &lt;/P&gt;&lt;P&gt;Hope this will give you solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;RS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2015 06:27:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986124#M952202</guid>
      <dc:creator>raghvendrasingh</dc:creator>
      <dc:date>2015-11-26T06:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement a join with 'OR' condition</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986125#M952203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class="replyToName"&gt;&lt;/SPAN&gt;&lt;A href="https://community.qlik.com/people/balrajahlawat"&gt;balrajahlawat&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. However, I don't have the luck as you think. Call_ID is unique, but not primary key as it is not compulsory. Also the Oracle table didn't store the same information as the SQL_Server_Table so they can't be concatenated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be let me clarify my requirement further.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to request QlikView to join the two tables if they matched to either one of the following criteria.&lt;/P&gt;&lt;P&gt;A. Same Call_ID &lt;SPAN style="text-decoration: underline;"&gt;OR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;B. Different Call_ID BUT, same Case_No and the date portion of the Call_Time timestamp field between the two tables are the same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oracle Table &lt;/P&gt;&lt;P&gt;Case_ID:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Missing&lt;/P&gt;&lt;P&gt;Case_NO: 0001&lt;/P&gt;&lt;P&gt;Call_Time: '2015/01/01 01:00 AM'&lt;/P&gt;&lt;P&gt;Oracle_Field_A:111&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL_Server&lt;/P&gt;&lt;P&gt;Case_ID: 100001A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ////Different Case_ID&lt;/P&gt;&lt;P&gt;Case_NO: 0001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Same Case_No&lt;/P&gt;&lt;P&gt;Call_Time: '2015/01/01 01:55 AM' /////// Different Timestamp, but same day.&lt;/P&gt;&lt;P&gt;SQLServer_Field_A: A1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Than I am expecting that this two rows are for the same record and they need to be joined&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, as you can see in my SQL statement in Access, I have to use the OR operator to force Access to join them by using either one of the two criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2015 06:37:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986125#M952203</guid>
      <dc:creator />
      <dc:date>2015-11-26T06:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement a join with 'OR' condition</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986126#M952204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you applied the logic and got the answer then close the thread after making it correct /helpful &lt;SPAN style="font-size: 13.3333px;"&gt;answer&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;else you can share qvw with some dummy data, we will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raghvendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2015 06:50:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986126#M952204</guid>
      <dc:creator>raghvendrasingh</dc:creator>
      <dc:date>2015-11-26T06:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement a join with 'OR' condition</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986127#M952205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/people/raghvendra.singh"&gt;raghvendra.singh&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response. My apologise that I may not clearly stated my requirement from my original statement, but I think your solution is close and will bring me on to the right track as I am thinking something similar as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be let me clarify my requirement further.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to request QlikView to join the two tables if they matched to either one of the following criteria.&lt;/P&gt;&lt;P&gt;A. Same Call_ID &lt;SPAN style="text-decoration: underline;"&gt;OR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;B. Different Call_ID BUT, same Case_No and the date portion of the Call_Time timestamp field between the two tables are the same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oracle Table &lt;/P&gt;&lt;P&gt;Case_ID:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Missing&lt;/P&gt;&lt;P&gt;Case_NO: 0001&lt;/P&gt;&lt;P&gt;Call_Time: '2015/01/01 01:00 AM'&lt;/P&gt;&lt;P&gt;Oracle_Field_A:111&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL_Server&lt;/P&gt;&lt;P&gt;Case_ID: 100001A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ////Different Case_ID&lt;/P&gt;&lt;P&gt;Case_NO: 0001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Same Case_No&lt;/P&gt;&lt;P&gt;Call_Time: '2015/01/01 01:55 AM' /////// Different Timestamp, but same day.&lt;/P&gt;&lt;P&gt;SQLServer_Field_A: A1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Than I am expecting that this two rows are for the same record and they need to be joined&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what I am thinking is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1, join the two tables using the criteria A (Same Call_ID)&lt;/P&gt;&lt;P&gt;2. Store this result&lt;/P&gt;&lt;P&gt;3. Reload the two tables into Qlikview, but this time, add a new column that only store the date portion of of the Call_Time. and join the two table again using the second criteria&amp;nbsp; (Different Call_ID BUT, same Case_No and the date portion of the Call_Time timestamp field between the two tables are the same)&lt;/P&gt;&lt;P&gt;4. Union the two result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you think this way will work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2015 06:56:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986127#M952205</guid>
      <dc:creator />
      <dc:date>2015-11-26T06:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement a join with 'OR' condition</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986128#M952206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to take a few steps to perform the two joins. Attempting the above options will miss certain records (call IDs match but CallNo or CallTime do not) and could potentially duplicate others. I suggest the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Load the sources - add key fields for joins -- &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13.3333px;"&gt;//------------------------------------------------------------------------------------------&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Load Oracle source&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CONNECT ... to Oracle ...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Oracle_Table:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD *,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; AutoNumber(Call_ID, 'key1') As Key1,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; AutoNumber(CaseNo &amp;amp; Call_Time, 'key2') As Key2&lt;/EM&gt;&lt;EM&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SQL SELECT&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Call_ID,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Case_No,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Call_Time,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Oracle_Field_A,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Oracle_Field_B,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Oracle_Field_C,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; ...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM OracleTable;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//------------------------------------------------------------------------------------------&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Load SQL Server source&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CONNECT ... to SQL Server ...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; Temp_SQL_Table:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD *,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; AutoNumber(Call_ID, 'key1') As Key1,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; AutoNumber(CaseNo &amp;amp; Call_Time, 'key2') As Key2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; RowNo() As Sql.RowKey&lt;/EM&gt;&lt;EM&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SQL SELECT&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Call_ID,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Case_No,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Call_Time,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; SQLServer_Field_A,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; SQLServer_Field_B,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; SQLServer_Field_C,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; ...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM SQLTable;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. Do the two joins into temp key fields&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//------------------------------------------------------------------------------------------&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Left Join (Oracle_Table)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Key1,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Sql.RowKey As RowKey1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident Temp_SQL_Table;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Left Join (Oracle_Table)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Key2,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Sql.RowKey As RowKey2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident Temp_SQL_Table&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;WHERE Not(Exists(RowKey1, Sql.RowKey));&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. Compile the result in two steps (use inner joins to create two sub tables)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//------------------------------------------------------------------------------------------&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// First key (&lt;EM style="font-size: 13.3333px;"&gt;Call_ID)&lt;/EM&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Result:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NoConcatenate:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD *&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident Oracle_Table;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Innner Join (Result)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Sql.RowKey As RowKey1,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; SQLServer_Field_A,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; SQLServer_Field_B,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; SQLServer_Field_C,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; ...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident Temp_SQL_Table;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//------------------------------------------------------------------------------------------&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Second key (&lt;/EM&gt;&lt;EM&gt;Case_No,&lt;/EM&gt;&lt;EM&gt;&amp;nbsp; Call_Time)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Result2:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NoConcatenate:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD *&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident Oracle_Table;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Innner Join (Result2)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Sql.RowKey As RowKey2,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; SQLServer_Field_A,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; SQLServer_Field_B,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; SQLServer_Field_C,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; ...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident Temp_SQL_Table;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4. Pull together&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//------------------------------------------------------------------------------------------&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// And together&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Concatenate(Result)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * Resident Result2;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//------------------------------------------------------------------------------------------&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// And unmatched rows from the oracle table&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Concatenate(Result)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * Resident Oracle_Table&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Where IsNull(RowKey1) And IsNull(RowKey2);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//------------------------------------------------------------------------------------------&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Clean up&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Tables Oracle_Table, Temp_SQL_Table, Result2;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Fields RowKey1, RowKey2, Sql.RowKey, Key1, Key2;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2015 07:02:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986128#M952206</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-11-26T07:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement a join with 'OR' condition</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986129#M952207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/people/jontydkpi"&gt;jontydkpi&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thinkyour solution lead me to the right track. But I don't know why I got a funky join result. Would be it be because I actually load the two tables from two different QVD files that was created from two different QlikView Worksheet file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read the book QlikView 11 For Developer mentioned&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;" It is important to note that the AutoNumber() function returns a number solely based on the load order. Encoding the same value in different QVW files might return different numbers. Therefore it is not possible to use results of the AutoNumber() function sourced from multiple QlikView documents."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would it be resolved if I prepare both QVD files under the same QlikView Worksheet file and have the key stored in the corresponding QVD file proceed?&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, 27 Nov 2015 00:16:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986129#M952207</guid>
      <dc:creator />
      <dc:date>2015-11-27T00:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement a join with 'OR' condition</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986130#M952208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" class="jiveTT-hover-user jive-link-profile-small" data-containerid="-1" data-containertype="-1" data-objectid="13229" data-objecttype="3" href="https://community.qlik.com/people/jontydkpi"&gt;jonathan dienst&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found the reason for my funny result now. It was because a typo from my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works great now. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elim.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 01:18:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-implement-a-join-with-OR-condition/m-p/986130#M952208</guid>
      <dc:creator />
      <dc:date>2015-11-27T01:18:28Z</dc:date>
    </item>
  </channel>
</rss>

