<?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 Pulling data from a table based on another table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pulling-data-from-a-table-based-on-another-table/m-p/1401488#M613169</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 been stuck trying out several different solutions for my issue, but can't seem to figure out where I am going wrong:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 3 table:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Excel spreadsheet with 2 data points (Machines)&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: #ff0000;"&gt;Serial number&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Machine name&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;DB with three data points (Order)&lt;UL&gt;&lt;LI&gt;Order number&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #ff0000;"&gt;Serial number&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #800080;"&gt;Customer number&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;DB with two data points (Customer)&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: #800080;"&gt;Customer number&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Customer name&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have already matched up the serial numbers in Machines and Order to give me a unique Order number based on the Serial number by using NoConcatenate and dropping the order table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am facing at this point, is that the Customer table has nothing to match with when the Order table is dropped and therefore gives me rubbish when I add the Customer name to my visualization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The short and sweet code as of now:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Machines:&lt;/P&gt;&lt;P&gt;LOAD &lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;SerialNumber&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&lt;SPAN style="font-size: 13.3333px;"&gt;Machine name&lt;/SPAN&gt;:"&lt;/P&gt;&lt;P&gt;FROM [xxxx.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aktor:&lt;/P&gt;&lt;P&gt;LOAD Nm,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080;"&gt;CustNo&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;SQL SELECT Nm,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800080;"&gt;CustNo&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM dbo.Customer;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Order:&lt;/P&gt;&lt;P&gt;LOAD distinct OrdNo,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080;"&gt;CustNo&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; R10 as &lt;SPAN style="color: #ff0000;"&gt;SerialNumber&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;SQL SELECT OrdNo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800080;"&gt;CustNo&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; R10&lt;/P&gt;&lt;P&gt;FROM dbo."Order";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;SerialNumber&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Max(OrdNo) as OrdNo&lt;/P&gt;&lt;P&gt;Resident Ordre1&lt;/P&gt;&lt;P&gt;where &lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;SerialNumber &lt;/SPAN&gt;&amp;gt; 10&lt;/P&gt;&lt;P&gt;Group By &lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;SerialNumber &lt;/SPAN&gt;Order By &lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;SerialNumber &lt;/SPAN&gt;asc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Order;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Nov 2017 08:40:05 GMT</pubDate>
    <dc:creator>johanru1</dc:creator>
    <dc:date>2017-11-16T08:40:05Z</dc:date>
    <item>
      <title>Pulling data from a table based on another table</title>
      <link>https://community.qlik.com/t5/QlikView/Pulling-data-from-a-table-based-on-another-table/m-p/1401488#M613169</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 been stuck trying out several different solutions for my issue, but can't seem to figure out where I am going wrong:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 3 table:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Excel spreadsheet with 2 data points (Machines)&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: #ff0000;"&gt;Serial number&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Machine name&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;DB with three data points (Order)&lt;UL&gt;&lt;LI&gt;Order number&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #ff0000;"&gt;Serial number&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #800080;"&gt;Customer number&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;DB with two data points (Customer)&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: #800080;"&gt;Customer number&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Customer name&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have already matched up the serial numbers in Machines and Order to give me a unique Order number based on the Serial number by using NoConcatenate and dropping the order table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am facing at this point, is that the Customer table has nothing to match with when the Order table is dropped and therefore gives me rubbish when I add the Customer name to my visualization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The short and sweet code as of now:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Machines:&lt;/P&gt;&lt;P&gt;LOAD &lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;SerialNumber&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&lt;SPAN style="font-size: 13.3333px;"&gt;Machine name&lt;/SPAN&gt;:"&lt;/P&gt;&lt;P&gt;FROM [xxxx.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aktor:&lt;/P&gt;&lt;P&gt;LOAD Nm,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080;"&gt;CustNo&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;SQL SELECT Nm,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800080;"&gt;CustNo&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM dbo.Customer;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Order:&lt;/P&gt;&lt;P&gt;LOAD distinct OrdNo,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080;"&gt;CustNo&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; R10 as &lt;SPAN style="color: #ff0000;"&gt;SerialNumber&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;SQL SELECT OrdNo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800080;"&gt;CustNo&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; R10&lt;/P&gt;&lt;P&gt;FROM dbo."Order";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;SerialNumber&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Max(OrdNo) as OrdNo&lt;/P&gt;&lt;P&gt;Resident Ordre1&lt;/P&gt;&lt;P&gt;where &lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;SerialNumber &lt;/SPAN&gt;&amp;gt; 10&lt;/P&gt;&lt;P&gt;Group By &lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;SerialNumber &lt;/SPAN&gt;Order By &lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;SerialNumber &lt;/SPAN&gt;asc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Order;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 08:40:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pulling-data-from-a-table-based-on-another-table/m-p/1401488#M613169</guid>
      <dc:creator>johanru1</dc:creator>
      <dc:date>2017-11-16T08:40:05Z</dc:date>
    </item>
  </channel>
</rss>

