<?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 Linking Qlikview and SQL table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Linking-Qlikview-and-SQL-table/m-p/181429#M47463</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Presumably you need to provide a "default" status if there is no status in the sqlPO table.&lt;/P&gt;&lt;P&gt;What about FirstSortedValue(if( isnull(status), 'no status', status ),-timestamp)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Sep 2010 04:38:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-09-01T04:38:11Z</dc:date>
    <item>
      <title>Linking Qlikview and SQL table</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-Qlikview-and-SQL-table/m-p/181428#M47462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a &lt;B&gt;Purchase Order&lt;/B&gt; number that is loaded into a Qlikview Table from a text file. Every Purchase Order have an action;&lt;/P&gt;&lt;P&gt;Pull&lt;BR /&gt;Push&lt;BR /&gt;Cancel&lt;BR /&gt;Reconfirm&lt;/P&gt;&lt;P&gt;Each buyer writes a comment per purchase order that is saved in a SQL database. The &lt;B&gt;Purchase Order&lt;/B&gt; number is the key. The buyer also selects a &lt;B&gt;Status&lt;/B&gt; showing if the purchase order action is open, escalated or resolved.&lt;/P&gt;&lt;P&gt;I want to have a drop-down select or equivalent for the &lt;B&gt;Status&lt;/B&gt; field, i.e. being able to select or resolved, escalated or open Purchase Orders.&lt;/P&gt;&lt;P&gt;I have written this Load Script (timestamp is the datetime when the comment was written);&lt;/P&gt;&lt;P style="font-style: italic; font-weight: bold"&gt;LOAD po_key,&lt;BR /&gt; FirstSortedValue(Status,-timestamp) as POstatus&lt;BR /&gt;resident sqlPO&lt;BR /&gt;group by po_key;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This work perfectly as long as a Purchase Order has a comment in the SQL table. But if the SQL table doesn't have a &lt;B&gt;Status&lt;/B&gt; for that Purchase Order then it doesn't work.&lt;/P&gt;&lt;P&gt;How do I write the script to make it work?&lt;/P&gt;&lt;P&gt;The comment is updated using Partial Reload and I'd rather not update the entire Qlikview Table which I assume I have to if I join the two tables.&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Resulting Table&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 185pt;" width="247"&gt;&lt;COL style="width: 89pt;" width="119" /&gt;&lt;COL span="2" style="width: 48pt;" width="64" /&gt;&lt;TBODY&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl23" height="17" style="height: 12.75pt; width: 89pt;" width="119"&gt;&lt;B&gt;Purchase_order&lt;/B&gt;&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; width: 48pt;" width="64"&gt;&lt;B&gt;Status&lt;/B&gt;&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; width: 48pt;" width="64"&gt;&lt;B&gt;…&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="border-top: medium none; height: 12.75pt;"&gt;PO1&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;Resolved&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="border-top: medium none; height: 12.75pt;"&gt;PO2&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;Open&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="border-top: medium none; height: 12.75pt;"&gt;PO3&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;Open&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="border-top: medium none; height: 12.75pt;"&gt;PO4&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;Escalated&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="border-top: medium none; height: 12.75pt;"&gt;&lt;P&gt;PO5&lt;/P&gt;&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;Open&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="font-weight: bold"&gt;SQL Comment Table&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 191pt;" width="255"&gt;&lt;COL style="width: 89pt;" width="119" /&gt;&lt;COL style="width: 54pt;" width="72" /&gt;&lt;COL style="width: 48pt;" width="64" /&gt;&lt;TBODY&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="height: 12.75pt; width: 89pt;" width="119"&gt;&lt;B&gt;Purchase_order&lt;/B&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-left: medium none; width: 54pt;" width="72"&gt;&lt;B&gt;Status&lt;/B&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-left: medium none; width: 48pt;" width="64"&gt;&lt;B&gt;Comment&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" height="17" style="border-top: medium none; height: 12.75pt;"&gt;PO1&lt;/TD&gt;&lt;TD class="xl24" style="border-top: medium none; border-left: medium none;"&gt;Resolved&lt;/TD&gt;&lt;TD class="xl24" style="border-top: medium none; border-left: medium none;"&gt;&lt;B&gt;&lt;/B&gt;test&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" height="17" style="border-top: medium none; height: 12.75pt;"&gt;PO4&lt;/TD&gt;&lt;TD class="xl24" style="border-top: medium none; border-left: medium none;"&gt;Escalated&lt;/TD&gt;&lt;TD class="xl24" style="border-top: medium none; border-left: medium none;"&gt;&lt;B&gt;&lt;/B&gt;test&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="font-weight: bold"&gt;Qlikview Table (text file)&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 185pt;" width="247"&gt;&lt;COL style="width: 89pt;" width="119" /&gt;&lt;COL span="2" style="width: 48pt;" width="64" /&gt;&lt;TBODY&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl23" height="17" style="height: 12.75pt; width: 89pt;" width="119"&gt;&lt;B&gt;Purchase_order&lt;/B&gt;&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; width: 48pt;" width="64"&gt;&lt;B&gt;Action&lt;/B&gt;&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; width: 48pt;" width="64"&gt;&lt;B&gt;…&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="border-top: medium none; height: 12.75pt;"&gt;PO1&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;Pull&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="border-top: medium none; height: 12.75pt;"&gt;PO2&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;Cancel&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="border-top: medium none; height: 12.75pt;"&gt;PO3&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;Pull&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="border-top: medium none; height: 12.75pt;"&gt;PO4&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;Push&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="border-top: medium none; height: 12.75pt;"&gt;&lt;P&gt;PO5&lt;/P&gt;&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;Pull&lt;/TD&gt;&lt;TD class="xl22" style="border-top: medium none; border-left: medium none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Aug 2010 14:37:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-Qlikview-and-SQL-table/m-p/181428#M47462</guid>
      <dc:creator />
      <dc:date>2010-08-31T14:37:56Z</dc:date>
    </item>
    <item>
      <title>Linking Qlikview and SQL table</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-Qlikview-and-SQL-table/m-p/181429#M47463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Presumably you need to provide a "default" status if there is no status in the sqlPO table.&lt;/P&gt;&lt;P&gt;What about FirstSortedValue(if( isnull(status), 'no status', status ),-timestamp)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2010 04:38:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-Qlikview-and-SQL-table/m-p/181429#M47463</guid>
      <dc:creator />
      <dc:date>2010-09-01T04:38:11Z</dc:date>
    </item>
  </channel>
</rss>

