<?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 Incremental Load with Variables and SQL 2005 Urgent in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Incremental-Load-with-Variables-and-SQL-2005-Urgent/m-p/331871#M704983</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I seem to be having an issue with Incremental Load and using the Today() function with SQL 2005 database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;((changedate) &amp;gt;= $(LastExecTime) AND (changedate) &amp;lt; $(ThisExecTime))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above is not working as this morning it did not load any changes made yesterday. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am guessing that the variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let ThisExecTime=(today());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is returning the date 5/2/2012 so I am assuming that the above (According to the log file)&amp;nbsp; formula is now showing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;((changedate) &amp;gt;= &lt;STRONG&gt;5/1/2012&lt;/STRONG&gt; AND (changedate) &amp;lt;&lt;STRONG&gt; 5/2/2012&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I am guessing that qlikview does not see the above &lt;STRONG&gt;BOLDS &lt;/STRONG&gt;as dates when it runs the script, but it does not produce an error and loads everything from the QVD File just fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Qlikview Reference document it says to use:&lt;/P&gt;&lt;P&gt;ModificationTime &amp;gt;= #$(LastExecTime)#&lt;/P&gt;&lt;P&gt;AND ModificationTime &amp;lt; #$(ThisExecTime)#&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try the above: ((changedate) &amp;gt;= #$(LastExecTime)# AND (changedate) &amp;lt; #$(ThisExecTime)#)&lt;/P&gt;&lt;P&gt;((changedate) &amp;gt;= #&lt;STRONG&gt;5/1/2012#&lt;/STRONG&gt; AND (changedate) &amp;lt;&lt;STRONG&gt; #5/2/2012#&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script Fails with just an error in the log &lt;/P&gt;&lt;P&gt;General Script Error&lt;/P&gt;&lt;P&gt;5/2/2012:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Execution Failed&lt;/P&gt;&lt;P&gt;5/2/2012:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Execution finished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next I tried to tell it that the variable is a date using:&lt;/P&gt;&lt;P&gt;Let ThisExecTime= 'Date('&amp;amp;(today())&amp;amp;')';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I still get the same above error, and am guessing it is because Date() is not recognized in SQL 2005&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas on what I should do here? Somewhat urgent as without this worjking 2 dashboards are now displaying the wrong data results. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 May 2012 13:10:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-02T13:10:43Z</dc:date>
    <item>
      <title>Incremental Load with Variables and SQL 2005 Urgent</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-with-Variables-and-SQL-2005-Urgent/m-p/331871#M704983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I seem to be having an issue with Incremental Load and using the Today() function with SQL 2005 database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;((changedate) &amp;gt;= $(LastExecTime) AND (changedate) &amp;lt; $(ThisExecTime))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above is not working as this morning it did not load any changes made yesterday. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am guessing that the variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let ThisExecTime=(today());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is returning the date 5/2/2012 so I am assuming that the above (According to the log file)&amp;nbsp; formula is now showing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;((changedate) &amp;gt;= &lt;STRONG&gt;5/1/2012&lt;/STRONG&gt; AND (changedate) &amp;lt;&lt;STRONG&gt; 5/2/2012&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I am guessing that qlikview does not see the above &lt;STRONG&gt;BOLDS &lt;/STRONG&gt;as dates when it runs the script, but it does not produce an error and loads everything from the QVD File just fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Qlikview Reference document it says to use:&lt;/P&gt;&lt;P&gt;ModificationTime &amp;gt;= #$(LastExecTime)#&lt;/P&gt;&lt;P&gt;AND ModificationTime &amp;lt; #$(ThisExecTime)#&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try the above: ((changedate) &amp;gt;= #$(LastExecTime)# AND (changedate) &amp;lt; #$(ThisExecTime)#)&lt;/P&gt;&lt;P&gt;((changedate) &amp;gt;= #&lt;STRONG&gt;5/1/2012#&lt;/STRONG&gt; AND (changedate) &amp;lt;&lt;STRONG&gt; #5/2/2012#&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script Fails with just an error in the log &lt;/P&gt;&lt;P&gt;General Script Error&lt;/P&gt;&lt;P&gt;5/2/2012:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Execution Failed&lt;/P&gt;&lt;P&gt;5/2/2012:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Execution finished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next I tried to tell it that the variable is a date using:&lt;/P&gt;&lt;P&gt;Let ThisExecTime= 'Date('&amp;amp;(today())&amp;amp;')';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I still get the same above error, and am guessing it is because Date() is not recognized in SQL 2005&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas on what I should do here? Somewhat urgent as without this worjking 2 dashboards are now displaying the wrong data results. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2012 13:10:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-with-Variables-and-SQL-2005-Urgent/m-p/331871#M704983</guid>
      <dc:creator />
      <dc:date>2012-05-02T13:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Incremental Load with Variables and SQL 2005 Urgent</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-with-Variables-and-SQL-2005-Urgent/m-p/331872#M704984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have also just tried this: &lt;/P&gt;&lt;P&gt;((CAST((&amp;nbsp; STR( ( YEAR(changedate) ) ) + '/' +&amp;nbsp; STR( MONTH(changedate) ) + '/' +&amp;nbsp; STR( DAY(changedate) )&amp;nbsp; ) AS DATETIME) ) &amp;gt;= CAST((&amp;nbsp; STR( ( 2012 ) ) + '/' +&amp;nbsp; STR( (5) ) + '/' +&amp;nbsp; STR((1) )&amp;nbsp; ) AS DATETIME)&amp;nbsp; AND (CAST((&amp;nbsp; STR( ( YEAR(changedate) ) ) + '/' +&amp;nbsp; STR( MONTH(changedate) ) + '/' +&amp;nbsp; STR( DAY(changedate) )&amp;nbsp; ) AS DATETIME) ) &amp;lt;= CAST((&amp;nbsp; STR( ( 2012 ) ) + '/' +&amp;nbsp; STR( (&lt;STRONG&gt;May&lt;/STRONG&gt;) ) + '/' +&amp;nbsp; STR((2) )&amp;nbsp; ) AS DATETIME) )&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trying to convert to SQL terms so the format is the same, however it still fails with just a General Script Error. Really wish this error was more descriptive. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: Just noticed in the log that it saved the variable month(today()) as the monthname MAY. changed it to use num(month(today())) and it is working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2012 14:02:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-with-Variables-and-SQL-2005-Urgent/m-p/331872#M704984</guid>
      <dc:creator />
      <dc:date>2012-05-02T14:02:32Z</dc:date>
    </item>
  </channel>
</rss>

