<?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 Help Flagging &amp; eliminating duplicates or Simplifying my Loads for for Three fields (SQL in ERP works but cant get same results in Qlikview) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-Flagging-eliminating-duplicates-or-Simplifying-my-Loads-for/m-p/225149#M77488</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I`m not sure i have understood your question, i assume that you want a below table as your output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="white" border="1" cellpadding="0" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR align="left"&gt;&lt;TH&gt;&lt;STRONG&gt;Part Number&lt;/STRONG&gt; &lt;STRONG&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH&gt;&lt;STRONG&gt;Item Status&lt;/STRONG&gt; &lt;STRONG&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH&gt;&lt;STRONG&gt;Commodity Code&lt;/STRONG&gt; &lt;STRONG&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR align="left" class="even"&gt;&lt;TD bgcolor="white"&gt;6551-246&lt;/TD&gt;&lt;TD bgcolor="white"&gt;1&lt;/TD&gt;&lt;TD bgcolor="white"&gt;093&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="left"&gt;&lt;TD bgcolor="white"&gt;6551-246&lt;/TD&gt;&lt;TD bgcolor="white"&gt;4&lt;/TD&gt;&lt;TD bgcolor="white"&gt;OBP&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If that is the case instead of using a simple Join use INNER JOIN, QV default join is OUTER JOIN.&lt;/P&gt;&lt;P&gt;Your Code should be as follows&lt;/P&gt;&lt;P&gt;Itemtemp:&lt;BR /&gt;LOAD&lt;BR /&gt; [Part Number],&lt;BR /&gt; [Item Status],&lt;BR /&gt; [Commodity Code],&lt;BR /&gt; recno() as Recno&lt;BR /&gt;FROM $(Stage2QVDPath1)\ItemMaster.qvd(qvd);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;INNER JOIN (Itemtemp)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LOAD DISTINCT&lt;BR /&gt; min(Recno) as Recno,&lt;BR /&gt; [Part Number],&lt;BR /&gt; [Item Status],&lt;BR /&gt; [Commodity Code]&lt;BR /&gt;RESIDENT Itemtemp&lt;BR /&gt;GROUP BY [Part Number],[Item Status],[Commodity Code]&lt;BR /&gt;ORDER BY [Part Number]ASC,[Item Status]ASC,[Commodity Code]ASC;&lt;/P&gt;&lt;P&gt;If this doesnt solve your purpose, share you ItemMaster.qvd and also your requirements clearly&lt;/P&gt;&lt;P&gt;- Sridhar&lt;IMG alt="Yes" src="http://community.qlik.com/emoticons/emotion-21.gif" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Apr 2011 04:18:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-21T04:18:40Z</dc:date>
    <item>
      <title>Help Flagging &amp; eliminating duplicates or Simplifying my Loads for for Three fields (SQL in ERP works but cant get same results in Qlikview)</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Flagging-eliminating-duplicates-or-Simplifying-my-Loads-for/m-p/225148#M77487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am still on the lower end of the learning curve with Qlikview and one of the only person trying to excel and learn Qlikview, my company implemented Qlikview a few months ago and i have been trying to learn as much as can.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I have three fields: [Part Number],&lt;/STRONG&gt; [Item Status] and [Commodity Code&lt;/P&gt;&lt;P&gt;I can run a SQL view in our ERP system below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT impn, imsts, imccod&lt;/P&gt;&lt;P&gt;FROM sun400mfg/fkitmstr&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;GROUP BY&lt;/P&gt;&lt;P&gt;HAVING&lt;/P&gt;&lt;P&gt;UNION&lt;/P&gt;&lt;P&gt;ORDER BY impn ASC, imsts ASC, imccod ASC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Number of unique keys . . . 1&lt;/P&gt;&lt;P&gt;Join type . . . . . . . . . *PARTOUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i get exactly what i need &lt;STRONG&gt;one part number sorted ascending,&lt;/STRONG&gt; &lt;STRONG&gt;one status code sorted ascending&lt;/STRONG&gt; and &lt;STRONG&gt;one commodity code sorted ascending.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Currently the below is my issue, I have also attached a QVW.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have spent over 8 hrs trying to script the above in Qlikview and can't get the same results. Instead i get the attached which is the same as the below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="white" border="1" bordercolor="white" cellpadding="0" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR align="left" bgcolor="#F5F5F5"&gt;&lt;TH&gt;&lt;STRONG&gt;Part Number&lt;/STRONG&gt; &lt;STRONG&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH&gt;&lt;STRONG&gt;Item Status&lt;/STRONG&gt; &lt;STRONG&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH&gt;&lt;STRONG&gt;Commodity Code&lt;/STRONG&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR align="left" bgcolor="white"&gt;&lt;TD bgcolor="white"&gt;6551-246&lt;/TD&gt;&lt;TD bgcolor="white"&gt;1&lt;/TD&gt;&lt;TD bgcolor="white"&gt;093&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="left" bgcolor="white"&gt;&lt;TD bgcolor="white"&gt;6551-246&lt;/TD&gt;&lt;TD bgcolor="white"&gt;4&lt;/TD&gt;&lt;TD bgcolor="white"&gt;OBP&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="left" bgcolor="white"&gt;&lt;TD bgcolor="white"&gt;6551-246&lt;/TD&gt;&lt;TD bgcolor="white"&gt;4&lt;/TD&gt;&lt;TD bgcolor="white"&gt;093&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;STRONG&gt;The ideal script would give me the first record 6551-246 for a [Part number], Status 1 since it's sorted ascending and [Commodity Code] 093&lt;/STRONG&gt;. I have over 200k records in my file, the above is just a one part example to illustrate my issue.&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated. I've researched and I dont think that i explained my issue clearly in my previous post&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 01:31:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Flagging-eliminating-duplicates-or-Simplifying-my-Loads-for/m-p/225148#M77487</guid>
      <dc:creator />
      <dc:date>2011-04-21T01:31:29Z</dc:date>
    </item>
    <item>
      <title>Help Flagging &amp; eliminating duplicates or Simplifying my Loads for for Three fields (SQL in ERP works but cant get same results in Qlikview)</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Flagging-eliminating-duplicates-or-Simplifying-my-Loads-for/m-p/225149#M77488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I`m not sure i have understood your question, i assume that you want a below table as your output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="white" border="1" cellpadding="0" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR align="left"&gt;&lt;TH&gt;&lt;STRONG&gt;Part Number&lt;/STRONG&gt; &lt;STRONG&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH&gt;&lt;STRONG&gt;Item Status&lt;/STRONG&gt; &lt;STRONG&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH&gt;&lt;STRONG&gt;Commodity Code&lt;/STRONG&gt; &lt;STRONG&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR align="left" class="even"&gt;&lt;TD bgcolor="white"&gt;6551-246&lt;/TD&gt;&lt;TD bgcolor="white"&gt;1&lt;/TD&gt;&lt;TD bgcolor="white"&gt;093&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="left"&gt;&lt;TD bgcolor="white"&gt;6551-246&lt;/TD&gt;&lt;TD bgcolor="white"&gt;4&lt;/TD&gt;&lt;TD bgcolor="white"&gt;OBP&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If that is the case instead of using a simple Join use INNER JOIN, QV default join is OUTER JOIN.&lt;/P&gt;&lt;P&gt;Your Code should be as follows&lt;/P&gt;&lt;P&gt;Itemtemp:&lt;BR /&gt;LOAD&lt;BR /&gt; [Part Number],&lt;BR /&gt; [Item Status],&lt;BR /&gt; [Commodity Code],&lt;BR /&gt; recno() as Recno&lt;BR /&gt;FROM $(Stage2QVDPath1)\ItemMaster.qvd(qvd);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;INNER JOIN (Itemtemp)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LOAD DISTINCT&lt;BR /&gt; min(Recno) as Recno,&lt;BR /&gt; [Part Number],&lt;BR /&gt; [Item Status],&lt;BR /&gt; [Commodity Code]&lt;BR /&gt;RESIDENT Itemtemp&lt;BR /&gt;GROUP BY [Part Number],[Item Status],[Commodity Code]&lt;BR /&gt;ORDER BY [Part Number]ASC,[Item Status]ASC,[Commodity Code]ASC;&lt;/P&gt;&lt;P&gt;If this doesnt solve your purpose, share you ItemMaster.qvd and also your requirements clearly&lt;/P&gt;&lt;P&gt;- Sridhar&lt;IMG alt="Yes" src="http://community.qlik.com/emoticons/emotion-21.gif" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 04:18:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Flagging-eliminating-duplicates-or-Simplifying-my-Loads-for/m-p/225149#M77488</guid>
      <dc:creator />
      <dc:date>2011-04-21T04:18:40Z</dc:date>
    </item>
    <item>
      <title>Help Flagging &amp; eliminating duplicates or Simplifying my Loads for for Three fields (SQL in ERP works but cant get same results in Qlikview)</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Flagging-eliminating-duplicates-or-Simplifying-my-Loads-for/m-p/225150#M77489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sridhar thank you for adding your input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If part number is sorted ascending ,item status ascending and commodity code ascending the "Only select the first record" for each part number, regardless if there are multiple item status &amp;amp; commodity code combinations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="white" border="1" cellpadding="0" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR align="left"&gt;&lt;TH&gt;&lt;STRONG&gt;Part Number&lt;/STRONG&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH&gt;&lt;STRONG&gt;Item Status&lt;/STRONG&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH&gt;&lt;STRONG&gt;Commodity Code&lt;/STRONG&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR align="left" class="even"&gt;&lt;TD bgcolor="white"&gt;6551-246&lt;/TD&gt;&lt;TD bgcolor="white"&gt;1&lt;/TD&gt;&lt;TD bgcolor="white"&gt;093&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="left"&gt;&lt;TD bgcolor="white"&gt;&lt;/TD&gt;&lt;TD bgcolor="white"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD bgcolor="white"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;My desired output would be to sort part number ascending, item status ascending and commodity code ascending,&lt;/P&gt;&lt;P&gt;t&lt;B&gt;hen only select the first record for each part number as shown above,&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 16:52:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Flagging-eliminating-duplicates-or-Simplifying-my-Loads-for/m-p/225150#M77489</guid>
      <dc:creator />
      <dc:date>2011-04-21T16:52:55Z</dc:date>
    </item>
  </channel>
</rss>

