<?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 Date interpretation in incremental load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-interpretation-in-incremental-load/m-p/380970#M491319</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had an issue with my script (which is only a proof of concept in order to implement it i a larger qvw afterward).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tested it but it only load the entries within the QVD file and not from teh ODBC data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume that the problem is coming from the WHERE close of the select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you look at the Sage forum about their ODBC driver (...) many post talk about a specific format which is : {d YYYY-MM-DD}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In another script I have a where close which is as foloowing : Date &amp;gt; 2012-01-01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I've tried different combination for my incremental script and when you look at the reference book, they give a #$(variable)# as example assuming its a number comparison. But with the format given previously I think their should be a problem where the sql query should do a date comparison.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my script whether one of you as an idea on how to handle my issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET ThousandSep=' ';&lt;/P&gt;&lt;P&gt;SET DecimalSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep=' ';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='# ##0,00 €;-# ##0,00 €';&lt;/P&gt;&lt;P&gt;SET TimeFormat='hh:mm:ss';&lt;/P&gt;&lt;P&gt;SET DateFormat='DD/MM/YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;SET MonthNames='janv.;févr.;mars;avr.;mai;juin;juil.;août;sept.;oct.;nov.;déc.';&lt;/P&gt;&lt;P&gt;SET DayNames='lun.;mar.;mer.;jeu.;ven.;sam.;dim.';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ODBC CONNECT TO [SageBijouxLocal;DBQ=C:\Users\Public\Documents\Sage\Gestion commerciale\Gescom Bijou.gcm] (XUserId is cfMGLeEIELbSGXFNTDdEXQROFLdEHfAF);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let MomentDernExéc = '{d ' &amp;amp; Date(ReloadTime(),'YYYY-MM-DD') &amp;amp;'}';&lt;/P&gt;&lt;P&gt;Let ExecTime = '{d ' &amp;amp; Date(Now(),'YYYY-MM-DD') &amp;amp;'}';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Articles:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT * FROM "F_ARTICLE"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE AR_DATEMODIF &amp;gt;= $(MomentDernExéc) AND AR_DATEMODIF &amp;lt; $(ExecTime);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF Not IsNull(QvdCreateTime('Bijoux_Articles.qvd')) THEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate (Articles) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * FROM Bijoux_Articles.QVD (qvd) WHERE NOT Exists(AR_REF);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END IF &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NoOfRows(Articles) &amp;gt; 0 THEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vMessage = NoOfRows(Articles) &amp;amp; ' nouvel article';&lt;/P&gt;&lt;P&gt;MsgBox( $(vMessage), 'msgbox', 'OK', 'ICONASTERISK');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE Articles INTO Bijoux_Articles.QVD (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 26 Aug 2012 17:18:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-08-26T17:18:55Z</dc:date>
    <item>
      <title>Date interpretation in incremental load</title>
      <link>https://community.qlik.com/t5/QlikView/Date-interpretation-in-incremental-load/m-p/380970#M491319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had an issue with my script (which is only a proof of concept in order to implement it i a larger qvw afterward).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tested it but it only load the entries within the QVD file and not from teh ODBC data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume that the problem is coming from the WHERE close of the select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you look at the Sage forum about their ODBC driver (...) many post talk about a specific format which is : {d YYYY-MM-DD}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In another script I have a where close which is as foloowing : Date &amp;gt; 2012-01-01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I've tried different combination for my incremental script and when you look at the reference book, they give a #$(variable)# as example assuming its a number comparison. But with the format given previously I think their should be a problem where the sql query should do a date comparison.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my script whether one of you as an idea on how to handle my issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET ThousandSep=' ';&lt;/P&gt;&lt;P&gt;SET DecimalSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep=' ';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='# ##0,00 €;-# ##0,00 €';&lt;/P&gt;&lt;P&gt;SET TimeFormat='hh:mm:ss';&lt;/P&gt;&lt;P&gt;SET DateFormat='DD/MM/YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;SET MonthNames='janv.;févr.;mars;avr.;mai;juin;juil.;août;sept.;oct.;nov.;déc.';&lt;/P&gt;&lt;P&gt;SET DayNames='lun.;mar.;mer.;jeu.;ven.;sam.;dim.';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ODBC CONNECT TO [SageBijouxLocal;DBQ=C:\Users\Public\Documents\Sage\Gestion commerciale\Gescom Bijou.gcm] (XUserId is cfMGLeEIELbSGXFNTDdEXQROFLdEHfAF);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let MomentDernExéc = '{d ' &amp;amp; Date(ReloadTime(),'YYYY-MM-DD') &amp;amp;'}';&lt;/P&gt;&lt;P&gt;Let ExecTime = '{d ' &amp;amp; Date(Now(),'YYYY-MM-DD') &amp;amp;'}';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Articles:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT * FROM "F_ARTICLE"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE AR_DATEMODIF &amp;gt;= $(MomentDernExéc) AND AR_DATEMODIF &amp;lt; $(ExecTime);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF Not IsNull(QvdCreateTime('Bijoux_Articles.qvd')) THEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate (Articles) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * FROM Bijoux_Articles.QVD (qvd) WHERE NOT Exists(AR_REF);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END IF &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NoOfRows(Articles) &amp;gt; 0 THEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vMessage = NoOfRows(Articles) &amp;amp; ' nouvel article';&lt;/P&gt;&lt;P&gt;MsgBox( $(vMessage), 'msgbox', 'OK', 'ICONASTERISK');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE Articles INTO Bijoux_Articles.QVD (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Aug 2012 17:18:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-interpretation-in-incremental-load/m-p/380970#M491319</guid>
      <dc:creator />
      <dc:date>2012-08-26T17:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Date interpretation in incremental load</title>
      <link>https://community.qlik.com/t5/QlikView/Date-interpretation-in-incremental-load/m-p/380971#M491320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case one of you have the issue one of this day, I find he answer. The problem came from the variable init and format, which has to be done by a SET statement instead of LET, and for SAGE i could be directly in the 'YYYY-MM-DD' format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 07:34:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-interpretation-in-incremental-load/m-p/380971#M491320</guid>
      <dc:creator />
      <dc:date>2012-08-29T07:34:01Z</dc:date>
    </item>
  </channel>
</rss>

