<?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 Last 3 months' data in load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-3-months-data-in-load-script/m-p/179898#M46543</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;where&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date(&lt;STRONG&gt;TIME_INS&lt;/STRONG&gt;)&amp;lt;=MonthEnd(today()) and date(&lt;STRONG&gt;TIME_INS&lt;/STRONG&gt;)&amp;gt;=MonthStart(today(),-2) ;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Jan 2011 21:59:15 GMT</pubDate>
    <dc:creator>spividori</dc:creator>
    <dc:date>2011-01-21T21:59:15Z</dc:date>
    <item>
      <title>Last 3 months' data in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-months-data-in-load-script/m-p/179897#M46542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-weight: bold"&gt;How come the data return does not recognize my "where" clause? I was the data to return only the last 3 months' data. Can anyone help me to translate this into the correct statement?&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;B&gt;LOAD SELECT *&lt;/B&gt; &lt;B&gt;FROM&lt;/B&gt; dbo. A&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WHERE&lt;/STRONG&gt; Month(TIME_INS) &amp;gt;= month(current date) -3 AND Month(TIME_INS) &amp;lt;= month(current date)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 18:37:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-months-data-in-load-script/m-p/179897#M46542</guid>
      <dc:creator />
      <dc:date>2011-01-21T18:37:01Z</dc:date>
    </item>
    <item>
      <title>Last 3 months' data in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-months-data-in-load-script/m-p/179898#M46543</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;where&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date(&lt;STRONG&gt;TIME_INS&lt;/STRONG&gt;)&amp;lt;=MonthEnd(today()) and date(&lt;STRONG&gt;TIME_INS&lt;/STRONG&gt;)&amp;gt;=MonthStart(today(),-2) ;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 21:59:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-months-data-in-load-script/m-p/179898#M46543</guid>
      <dc:creator>spividori</dc:creator>
      <dc:date>2011-01-21T21:59:15Z</dc:date>
    </item>
    <item>
      <title>Re:Last 3 months' data in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-months-data-in-load-script/m-p/179899#M46544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doesn't work.... please help!!!!&lt;/P&gt;&lt;P&gt;it said "SQL Error:[IBM][CLI Driver][DB2/LINUXX8664] SQL0440N No authorized routine named "TODAY"/ "MonthStart" and "MonthEnd" of type "FUNCTION" having compatible arguments was found. SQLSTATE=42884&lt;/P&gt;&lt;P&gt;SQL Scriptline:&lt;BR /&gt;SQL State:42884"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 22:41:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-months-data-in-load-script/m-p/179899#M46544</guid>
      <dc:creator />
      <dc:date>2011-01-21T22:41:24Z</dc:date>
    </item>
    <item>
      <title>Last 3 months' data in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-months-data-in-load-script/m-p/179900#M46545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, the answer provided by Sandro, is what you asked for, but in a "QlikView Environment", so this is valid code in a &lt;B&gt;Load statement&lt;/B&gt;, you can't use the functions in a &lt;B&gt;SQL Select... from statement&lt;/B&gt; (they are exceptions to this rule)&lt;/P&gt;&lt;P&gt;You need to use the database functions&lt;/P&gt;&lt;P&gt;For example to extract the month from a timestamp:&lt;/P&gt;&lt;P&gt;in Oracle is &lt;B&gt;extract(month from field)&lt;/B&gt;&lt;BR /&gt;in Sql server is &lt;B&gt;month(field)&lt;/B&gt;&lt;BR /&gt;in qlikview is &lt;B&gt;month(field)&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;Maybe for your database works &lt;B&gt;now()&lt;/B&gt; function, and find the functions for add days or months to your field&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 22:56:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-months-data-in-load-script/m-p/179900#M46545</guid>
      <dc:creator>hector</dc:creator>
      <dc:date>2011-01-21T22:56:34Z</dc:date>
    </item>
    <item>
      <title>Last 3 months' data in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-months-data-in-load-script/m-p/179901#M46546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;If Hector is right.&lt;BR /&gt;You could also try the following:&lt;/P&gt;&lt;P&gt;let hDate = date(today()+(day(today())-1));&lt;BR /&gt;let dDate = date(MonthStart(today(),-2));&lt;/P&gt;&lt;P&gt;where date(&lt;STRONG&gt;TIME_INS&lt;/STRONG&gt;)&amp;gt;=date('$(dDate)') and date(&lt;STRONG&gt;TIME_INS&lt;/STRONG&gt;)&amp;lt;=date('$(hDate)');&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 23:12:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-months-data-in-load-script/m-p/179901#M46546</guid>
      <dc:creator>spividori</dc:creator>
      <dc:date>2011-01-21T23:12:58Z</dc:date>
    </item>
    <item>
      <title>Last 3 months' data in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-months-data-in-load-script/m-p/179902#M46547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that works!! Thanks a lot!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jan 2011 17:26:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-months-data-in-load-script/m-p/179902#M46547</guid>
      <dc:creator />
      <dc:date>2011-01-24T17:26:44Z</dc:date>
    </item>
  </channel>
</rss>

