<?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: QS Data Load Table Join with Multiple Criteria in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/QS-Data-Load-Table-Join-with-Multiple-Criteria/m-p/1534090#M3556</link>
    <description>Correction/Answer: Had to add 'SQL' prior to select statement.</description>
    <pubDate>Wed, 23 Jan 2019 20:09:40 GMT</pubDate>
    <dc:creator>esuper21</dc:creator>
    <dc:date>2019-01-23T20:09:40Z</dc:date>
    <item>
      <title>QS Data Load Table Join with Multiple Criteria</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/QS-Data-Load-Table-Join-with-Multiple-Criteria/m-p/1531558#M3525</link>
      <description>&lt;P&gt;Hi, I have the below code from SQL. How do I translate this into the QS Data Load Editor?&amp;nbsp;&lt;/P&gt;&lt;P&gt;select a.Product_Name,&lt;BR /&gt;a.Manufacturer_Name,&lt;BR /&gt;a.SerialNumber,&lt;BR /&gt;a.Location_Name,&lt;BR /&gt;a.InventoryDate,&lt;BR /&gt;b.DateCollected,&lt;BR /&gt;b.FormName,&lt;BR /&gt;b.CollectedBy,&lt;BR /&gt;from msgat.dbo.assetsummary a join msgat.dbo.publisheddatasummary b&lt;BR /&gt;on a.serialnumber=b.serialnumber&lt;BR /&gt;where b.DateCollected = (select max(DateCollected)&lt;BR /&gt;from msgat.dbo.publisheddatasummary b WHERE a.SerialNumber = b.SerialNumber)&lt;BR /&gt;and(DateDiff(Day, b.DateCollected, a.InventoryDate) &amp;lt;&amp;gt;0&lt;BR /&gt;or DateDiff(Month, b.DateCollected, a.InventoryDate) &amp;lt;&amp;gt;0&lt;BR /&gt;or DateDiff(Year, b.DateCollected, a.InventoryDate) &amp;lt;&amp;gt;0)&lt;BR /&gt;and a.status&amp;lt;&amp;gt;'Disposed'&lt;BR /&gt;and a.serialnumber is not null&lt;BR /&gt;and ((a.LocationLineage LIKE '161%')&lt;BR /&gt;OR (a.LocationLineage LIKE '372%')&lt;BR /&gt;OR (a.LocationLineage LIKE '371%')&lt;BR /&gt;OR (a.LocationLineage LIKE '082%')&lt;BR /&gt;OR (a.LocationLineage LIKE 'SE2%')&lt;BR /&gt;OR (a.LocationLineage LIKE '154-1100%'))&lt;BR /&gt;ORDER BY SerialNumber&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 13:12:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/QS-Data-Load-Table-Join-with-Multiple-Criteria/m-p/1531558#M3525</guid>
      <dc:creator>esuper21</dc:creator>
      <dc:date>2019-01-17T13:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: QS Data Load Table Join with Multiple Criteria</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/QS-Data-Load-Table-Join-with-Multiple-Criteria/m-p/1531596#M3527</link>
      <description>&lt;P&gt;Have you tried following&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;Product_Name,&lt;BR /&gt;Manufacturer_Name,&lt;BR /&gt;SerialNumber,&lt;BR /&gt;Location_Name,&lt;BR /&gt;InventoryDate,&lt;BR /&gt;DateCollected,&lt;BR /&gt;FormName,&lt;BR /&gt;CollectedBy,&lt;BR /&gt;SQL&lt;BR /&gt;select a.Product_Name,&lt;BR /&gt;a.Manufacturer_Name,&lt;BR /&gt;a.SerialNumber,&lt;BR /&gt;a.Location_Name,&lt;BR /&gt;a.InventoryDate,&lt;BR /&gt;b.DateCollected,&lt;BR /&gt;b.FormName,&lt;BR /&gt;b.CollectedBy,&lt;BR /&gt;from msgat.dbo.assetsummary a join msgat.dbo.publisheddatasummary b&lt;BR /&gt;on a.serialnumber=b.serialnumber&lt;BR /&gt;where b.DateCollected = (select max(DateCollected)&lt;BR /&gt;from msgat.dbo.publisheddatasummary b WHERE a.SerialNumber = b.SerialNumber)&lt;BR /&gt;and(DateDiff(Day, b.DateCollected, a.InventoryDate) &amp;lt;&amp;gt;0&lt;BR /&gt;or DateDiff(Month, b.DateCollected, a.InventoryDate) &amp;lt;&amp;gt;0&lt;BR /&gt;or DateDiff(Year, b.DateCollected, a.InventoryDate) &amp;lt;&amp;gt;0)&lt;BR /&gt;and a.status&amp;lt;&amp;gt;'Disposed'&lt;BR /&gt;and a.serialnumber is not null&lt;BR /&gt;and ((a.LocationLineage LIKE '161%')&lt;BR /&gt;OR (a.LocationLineage LIKE '372%')&lt;BR /&gt;OR (a.LocationLineage LIKE '371%')&lt;BR /&gt;OR (a.LocationLineage LIKE '082%')&lt;BR /&gt;OR (a.LocationLineage LIKE 'SE2%')&lt;BR /&gt;OR (a.LocationLineage LIKE '154-1100%'))&lt;BR /&gt;ORDER BY SerialNumber;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 13:41:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/QS-Data-Load-Table-Join-with-Multiple-Criteria/m-p/1531596#M3527</guid>
      <dc:creator>vvira1316</dc:creator>
      <dc:date>2019-01-17T13:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: QS Data Load Table Join with Multiple Criteria</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/QS-Data-Load-Table-Join-with-Multiple-Criteria/m-p/1534090#M3556</link>
      <description>Correction/Answer: Had to add 'SQL' prior to select statement.</description>
      <pubDate>Wed, 23 Jan 2019 20:09:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/QS-Data-Load-Table-Join-with-Multiple-Criteria/m-p/1534090#M3556</guid>
      <dc:creator>esuper21</dc:creator>
      <dc:date>2019-01-23T20:09:40Z</dc:date>
    </item>
  </channel>
</rss>

