<?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: Abusing QlikView to historize a database table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560721#M692410</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;Can you post a script here.. &lt;/P&gt;&lt;P&gt;Its useful for analysis the cause of issues.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Sep 2013 13:09:47 GMT</pubDate>
    <dc:creator>MayilVahanan</dc:creator>
    <dc:date>2013-09-02T13:09:47Z</dc:date>
    <item>
      <title>Abusing QlikView to historize a database table</title>
      <link>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560720#M692409</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 am facing a challenge very similar to one I have already solved:&lt;/P&gt;&lt;P&gt;- A new plant has just taken up production a short while ago.&lt;/P&gt;&lt;P&gt;- I have to build a history of one database table, just like I did in this plant, because in the database it has no history.&lt;/P&gt;&lt;P&gt;- To do that, I have a LOAD statement with just two fields:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - The current date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - A count of item_numbers with several WHERE clauses.&lt;/P&gt;&lt;P&gt;- The result of this LOAD would then be stored as a qvd file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; With all the WHERE clauses in place, this load returns 0 records instead of returning the number 0 when no item_numbers were found matching the WHERE clauses. I have already tried avoiding this by way of an IF() fct, but so far it doesn't work.&lt;/P&gt;&lt;P&gt;Can anybody help me here?&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 12:55:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560720#M692409</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-09-02T12:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Abusing QlikView to historize a database table</title>
      <link>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560721#M692410</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;Can you post a script here.. &lt;/P&gt;&lt;P&gt;Its useful for analysis the cause of issues.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 13:09:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560721#M692410</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2013-09-02T13:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Abusing QlikView to historize a database table</title>
      <link>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560722#M692411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friedrich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you post a script example. If you make a group by current date the count should have at least one record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 13:12:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560722#M692411</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-09-02T13:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Abusing QlikView to historize a database table</title>
      <link>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560723#M692412</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 learnt it has nothing to do with my script - the error lies elsewhere.&lt;/P&gt;&lt;P&gt;That makes it rather more difficult, but we'll find out eventually.&lt;/P&gt;&lt;P&gt;In case that should solve the issue, I'll close this thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 13:22:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560723#M692412</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-09-02T13:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Abusing QlikView to historize a database table</title>
      <link>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560724#M692413</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;it is very strange:&lt;/P&gt;&lt;P&gt;For some reason - although as far as we can look, everything seems to be equal in the two plants - the date_field must be somehow different in the new database. The calculated ACTIVATION_DATE_DIFF, which in the old app looked like a time (HH:MM:SS), but without any suffix, in the new app is interpreted as a time (with 'AM' and 'PM' and thus cannot be used in the way I was planning to - in the old app, there is a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt; WHERE ACTIVATION_DATE_DIFF &amp;gt; 5&amp;nbsp; &amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;to return all the items that have been in this place for more than five days. This won't work in the new one.&lt;/P&gt;&lt;P&gt;The strange thing is, I can add both fields as listboxes to the GUI in the new app and there are values, only the ACTIVATION_DATE_DIFF field is a time with 'AM' and 'PM'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you lend me a hand here?&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 13:55:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560724#M692413</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-09-02T13:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Abusing QlikView to historize a database table</title>
      <link>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560725#M692414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This doesn't makes much sense. If ACTIVATION_DATE_DIFF is a time formatted with HH:MM:SS how can it be interpret as an amount of days to be compared &amp;gt; 5?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I still cannot recognize (without any script or explanation) if it's a Where against a database or QVD load.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 14:01:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560725#M692414</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-09-02T14:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Abusing QlikView to historize a database table</title>
      <link>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560726#M692415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ralf,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the WHERE clause is only in a RESIDENT LOAD based on a qvd load.&lt;/P&gt;&lt;P&gt;I have the same thing for the old plant and it works fine - the INTERVAL() fct returns both a STRING and a numeric value. That's how I can compare it.&lt;/P&gt;&lt;P&gt;I'm still onto this and I still cannot figure out why, in the new plant, QlikView interprets this INTERVAL() output as a time with 'AM' and 'PM' which it does not do with the old plant - it's also a new database, but it should be exactly the same, just a copy. All the formulas are the same, too, as far as I can tell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: The INTERVAL() in that instance has no specified format at all. I'll try specifying 'D HH:MM:SS' next.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 14:20:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560726#M692415</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-09-02T14:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Abusing QlikView to historize a database table</title>
      <link>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560727#M692416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see.. What if you use WHERE num(ACTIVATION_DATE_DIFF) &amp;gt; 5 then?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 14:24:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560727#M692416</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-09-02T14:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Abusing QlikView to historize a database table</title>
      <link>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560728#M692417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ralf,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no, that still does not work - as soon as I activate that WHERE clause, the script returns 0 records.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 14:28:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560728#M692417</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-09-02T14:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Abusing QlikView to historize a database table</title>
      <link>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560729#M692418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hard to say what's the cause with no data .. I guess it's in the data and has nothing to do with the shown format (AM/PM).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 14:30:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560729#M692418</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-09-02T14:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Abusing QlikView to historize a database table</title>
      <link>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560730#M692419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ralf,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that's what I was assuming all the time.&lt;/P&gt;&lt;P&gt;When I apply all the filters to the primary qvd_LOAD, then I get only 3 records, but those do have the date_field (timestamp, actually) all right, only the diff_field is still interpreted as a time with 'AM' and 'PM'.&lt;/P&gt;&lt;P&gt;When I use a num() fct on this, it seems to work.&lt;/P&gt;&lt;P&gt;I'll check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: Oh my - now I have a numeric value and I can compare it all right - but instead of now getting 1 record, just saying 0 (because, acc. to the listboxes, none of the items is older than 5 days), I get 0 records. I have to find a way of circumventing that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.P.S.: It gets stranger and stranger - I can load this num() value from the qvd all right, but I cannot reference it in any way in my RESIDENT LOAD - when I insert it into that load, I get an "Invalid expression" error...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 14:35:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560730#M692419</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-09-02T14:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Abusing QlikView to historize a database table</title>
      <link>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560731#M692420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ralf,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, for some reason, this field seems sensitive to the touch - I cannot include it in my RESIDENT LOAD to check, if I do I get an "Invalid expression" error. But I know the value, so that is not too bad.&lt;/P&gt;&lt;P&gt;(in this instance, the value is 3)&lt;/P&gt;&lt;P&gt;When I just include it in a WHERE expression, however, it works fine if I say WHERE Days_on_area &amp;gt; 1 - I still get that one record then.&lt;/P&gt;&lt;P&gt;When I change it to WHERE Days_on_area&amp;gt;5, however - it should be 5 - I get 0 records. OK, there is no record matching that condition, but I would like to avoid that by returning a 0 value in that case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, even though the thing stays mysterious, it is now down to quite a "simple" problem. I have tried an "&amp;lt;&amp;gt;0" condition and an ISNULL() condition, but those did not yet do the trick.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It might be because of QlikView's way of executing LOAD statements top-down - the COUNT I have, in itself, is okay, so the functions I have tried did not budge - only the WHERE clause reduces the nr. of records found to 0.&lt;/P&gt;&lt;P&gt;Thus I have to do like a RESIDENT LOAD. The problem is that I have nothing in that historical qvd yet, I was just making a start on it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: I would have to find a way to check the nr. of records that was written to that qvd file by the preceding LOAD statement.&lt;/P&gt;&lt;P&gt;Can that be done?&lt;/P&gt;&lt;P&gt;Then I could find out if any records were found and in the opposite case, I would just construct a record with only today's date and a 0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 15:22:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560731#M692420</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-09-02T15:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Abusing QlikView to historize a database table</title>
      <link>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560732#M692421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume I cannot solve this without having sample data and script..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 16:07:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560732#M692421</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-09-02T16:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: Abusing QlikView to historize a database table</title>
      <link>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560733#M692422</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 think now I have finally made it.&lt;/P&gt;&lt;P&gt;The trouble is, I will only know tomorrow if it really works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 12:04:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Abusing-QlikView-to-historize-a-database-table/m-p/560733#M692422</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-09-03T12:04:36Z</dc:date>
    </item>
  </channel>
</rss>

