<?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 Joining 2 fields from 2 different tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271960#M1202667</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, this will not work as i need to keep the both tables as they have more fields that i require in my script. What i have included in my original post is only a portion of it. There are about 25 fields in the table.&lt;/P&gt;&lt;P&gt;These 2 tables are not linked directly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Aug 2010 12:01:51 GMT</pubDate>
    <dc:creator>hopkinsc</dc:creator>
    <dc:date>2010-08-17T12:01:51Z</dc:date>
    <item>
      <title>Joining 2 fields from 2 different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271955#M1202662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, i need some help joining 2 fields from different tables.&lt;/P&gt;&lt;P&gt;My tables are as follows&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;StoreNumber,&lt;/P&gt;&lt;P&gt;TransId,&lt;/P&gt;&lt;P&gt;EmployeeId&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;C:\QLIKVIEW\Transaction.csv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;StoreNumber,&lt;/P&gt;&lt;P&gt;EmployeeName&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;C:\QLIKVIEW\Employee.csv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a new field called STOREEMPLOYEE from EmployeeId (from the first table) and EmployeeName (From the second table)&lt;/P&gt;&lt;P&gt;Can anyone tell me how to do thsi please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 10:41:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271955#M1202662</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2010-08-17T10:41:02Z</dc:date>
    </item>
    <item>
      <title>Joining 2 fields from 2 different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271956#M1202663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming StoreNumber is the key between these two tables.&lt;BR /&gt;EMPTRN:&lt;BR /&gt;LOAD&lt;/P&gt;&lt;P&gt;StoreNumber,&lt;/P&gt;&lt;P&gt;TransId,&lt;/P&gt;&lt;P&gt;EmployeeId&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;C:\QLIKVIEW\Transaction.csv;&lt;BR /&gt;Left join&lt;BR /&gt;LOAD&lt;/P&gt;&lt;P&gt;StoreNumber,&lt;/P&gt;&lt;P&gt;EmployeeName&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;C:\QLIKVIEW\Employee.csv;&lt;/P&gt;&lt;P&gt;EmpFinal:&lt;BR /&gt;Load *,&lt;BR /&gt;EmployeeId &amp;amp; EmployeeName as STOREEMPLOYEE&lt;BR /&gt;resident EMPTRN;&lt;BR /&gt;drop table EMPTRN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 11:10:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271956#M1202663</guid>
      <dc:creator />
      <dc:date>2010-08-17T11:10:59Z</dc:date>
    </item>
    <item>
      <title>Joining 2 fields from 2 different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271957#M1202664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To use "EmployeedId as STOREEMPLOYEE" in a the next help ...&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/674/3733.INNER-JOIN-VS-KEEP.bmp"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/674/3733.INNER-JOIN-VS-KEEP.bmp" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/674/4382.OUTER-JOIN.bmp"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/674/4382.OUTER-JOIN.bmp" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 11:29:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271957#M1202664</guid>
      <dc:creator>llauses243</dc:creator>
      <dc:date>2010-08-17T11:29:34Z</dc:date>
    </item>
    <item>
      <title>Joining 2 fields from 2 different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271958#M1202665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Is what you want even possible?&lt;/P&gt;&lt;P&gt;For any given storenumber, how will you know which EmployeeName relates to which EmployeeID? (Unless there is never more than one employee per StoreNumber)&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 11:44:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271958#M1202665</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-08-17T11:44:20Z</dc:date>
    </item>
    <item>
      <title>Joining 2 fields from 2 different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271959#M1202666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it is possible, It already works great, but with 2 seperate tables (1 for EmployeeId and 1 for Employee Name)&lt;/P&gt;&lt;P&gt;What i inlcuded earlier was only a tiny bit of my script, here is an image of my linked tables... &lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/674/7610.export.png"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/674/7610.export.png" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 11:57:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271959#M1202666</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2010-08-17T11:57:58Z</dc:date>
    </item>
    <item>
      <title>Joining 2 fields from 2 different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271960#M1202667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, this will not work as i need to keep the both tables as they have more fields that i require in my script. What i have included in my original post is only a portion of it. There are about 25 fields in the table.&lt;/P&gt;&lt;P&gt;These 2 tables are not linked directly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 12:01:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271960#M1202667</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2010-08-17T12:01:51Z</dc:date>
    </item>
    <item>
      <title>Joining 2 fields from 2 different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271961#M1202668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two separate tables might work - that does not imply that you can combine them into one.&lt;/P&gt;&lt;P&gt;You need to have some way of determining which EmployeeID maps to which EmployeeName - although I did not see an EmployeeID on the model.&lt;/P&gt;&lt;P&gt;One way to test this is to have a sheet showing 3 listboxes: StoreNumber, EmployeeID and EmployeeNumber. Play around withe selections on that and you'll see what I mean. I expect that if you select an employeeID, you'll see more than one name.&lt;/P&gt;&lt;P&gt;I am assuming that there is not some sort of denormalisation in your datasource, or in your load script.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 12:10:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271961#M1202668</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-08-17T12:10:27Z</dc:date>
    </item>
    <item>
      <title>Joining 2 fields from 2 different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271962#M1202669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jonathan, The employeeId is within the POSTransactionHeader, The table image i attached is limited, there are 20+ fields within most of the tables.&lt;/P&gt;&lt;P&gt;An employee name and ID are linked to a store number, So before the end user selects an employee they will first select a store number which then only displays employees relevant to that store.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 12:21:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271962#M1202669</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2010-08-17T12:21:28Z</dc:date>
    </item>
    <item>
      <title>Joining 2 fields from 2 different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271963#M1202670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, maybe the example in the initial post misled me. But I see no problem here, or do you need some guidance on the syntax of joining tables?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 12:34:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271963#M1202670</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-08-17T12:34:18Z</dc:date>
    </item>
    <item>
      <title>Joining 2 fields from 2 different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271964#M1202671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes please if you don't mind. Maybe i should have explained it in my initial post a bit better! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I know how to join fields within the same table, But i have never done it for fields from different tables.&lt;/P&gt;&lt;P&gt;Here is my QVW&lt;/P&gt;&lt;P&gt;I want to link&lt;/P&gt;&lt;P&gt;EmployeeId From POSTransactionHeader with&lt;/P&gt;&lt;P&gt;EmployeeName From StoreEmployee&lt;/P&gt;&lt;P&gt;Your help is very appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 12:43:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271964#M1202671</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2010-08-17T12:43:03Z</dc:date>
    </item>
    <item>
      <title>Joining 2 fields from 2 different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271965#M1202672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a sample script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;MYTABLE:&lt;BR /&gt;LOAD EmployeeID,&lt;BR /&gt; StoreNumber,&lt;BR /&gt; ...&lt;BR /&gt;FROM POSTTransactionHeader;&lt;BR /&gt;&lt;BR /&gt;INNER JOIN (MYTABLE)&lt;BR /&gt;LOAD EmployeeName,&lt;BR /&gt; StoreNumber,&lt;BR /&gt; ...&lt;BR /&gt;FROM StoreEmployee;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;This will join correctly on StoreNumber, but I am still a little concerned that you are going to get a cross join between EmployeeID and EmployeeName (ie each employeename for each store joined to every employeeID for that store) - which I assume is not what you want.&lt;/P&gt;&lt;P&gt;I would use the list boxes I suggested in an earlier post to check the results.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 12:53:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271965#M1202672</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-08-17T12:53:41Z</dc:date>
    </item>
    <item>
      <title>Joining 2 fields from 2 different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271966#M1202674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On checking the model you uploaded, you already have the store, ID and name together in the Store Employee table. The key appears to contain the store number and employeeID, and the name is (of course) in the EmployeeName field. Just split out the two values from the key and you have it (SUBFIELD or string manipulation).&lt;/P&gt;&lt;P&gt;No joins required!&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 13:01:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271966#M1202674</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-08-17T13:01:56Z</dc:date>
    </item>
    <item>
      <title>Joining 2 fields from 2 different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271967#M1202675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Jonathan, I'm not sure what you mean...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 13:07:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271967#M1202675</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2010-08-17T13:07:36Z</dc:date>
    </item>
    <item>
      <title>Joining 2 fields from 2 different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271968#M1202677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See Susan Carter in extract from StoreEmployee below:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;key value 16695 - 3 (store 16695, employee ID 3)&lt;/LI&gt;&lt;LI&gt;EmployeeName - Susan Carter&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So:&lt;/P&gt;&lt;P&gt;Store number = Num#(Left(%lkStoreEmployee, 5))&lt;/P&gt;&lt;P&gt;Employee ID = Num#(Mid(%lkStoreEmployee, 9, 5))&lt;/P&gt;&lt;P&gt;Employee name = EmployeeName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Assumes that this data is representative the whole set)&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 13:37:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271968#M1202677</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-08-17T13:37:09Z</dc:date>
    </item>
    <item>
      <title>Joining 2 fields from 2 different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271969#M1202679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jonathan for all your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 14:01:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-2-fields-from-2-different-tables/m-p/271969#M1202679</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2010-08-17T14:01:47Z</dc:date>
    </item>
  </channel>
</rss>

