<?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: Issue with comparing two timestamps (incremental load) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Issue-with-comparing-two-timestamps-incremental-load/m-p/66263#M604758</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to define the proper formatting and changing the variable-call like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Last_Updated_Date_Table:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;load&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;timestamp&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CREATE_TS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;STRONG&gt;'YYYY-MM-DD hh:mm:ss.fff'&lt;/STRONG&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Max_CREATE_TS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; TRA_Max;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;WHERE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;MAINDB&lt;SPAN style="font-size: 8pt;"&gt;.CREATE_TS &amp;gt;= &lt;STRONG&gt;'$(Last_Transaction)'&lt;/STRONG&gt; AND&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;MAINDB&lt;/SPAN&gt;.TRA_TYPE IN ('AAAA', 'BBBB') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Jun 2018 09:12:08 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2018-06-25T09:12:08Z</dc:date>
    <item>
      <title>Issue with comparing two timestamps (incremental load)</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-comparing-two-timestamps-incremental-load/m-p/66262#M604756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Qlikviewers,&lt;/P&gt;&lt;P&gt;I hope you can help me out with the issue I am having. I am trying to set up my first incremental load but am encoutering an issue with comparing two timestamps with eachother (goal is to get only new transactions).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how I mark the last/newest timestamp from the previous load:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//Load table to enable search for last record&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;TRA_Max:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CREATE_TS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; TRA_INCOMING.qvd(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;qvd&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;);&lt;BR /&gt; &lt;BR /&gt; Last_Updated_Date_Table:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;load&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;timestamp&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CREATE_TS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Max_CREATE_TS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; TRA_Max;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;Let&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #808080; font-size: 8pt;"&gt;&lt;EM&gt;Last_Transaction&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('Max_CREATE_TS',0,'Last_Updated_Date_Table');&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;Drop&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; TRA_Max;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;After this I query the DB using SQL. My load goed into error on the where clause.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;WHERE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;MAINDB&lt;SPAN style="font-size: 8pt;"&gt;.CREATE_TS &amp;gt;= $(Last_Transaction) AND&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;MAINDB&lt;/SPAN&gt;.TRA_TYPE IN ('AAAA', 'BBBB') &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;BR /&gt; ;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;This is the error I am getting (in German, sorry):&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;Auf "MAINDB.CREATE_TS &amp;gt;=" folgte das unerwartete Token "14.06.2018 20".&amp;nbsp; Zu den möglichen Token gehören: "&amp;lt;space&amp;gt;".&amp;nbsp; SQLSTATE=42601&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When i change &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;MAINDB&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;.CREATE_TS &amp;gt;= $(Last_Transaction) AND&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;to something else, such as:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;MAINDB.CREATE_TS BETWEEN '2017-01-01 00:00:00.000000' AND '2017-12-31 00:00:00.000000' AND&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then everything goes well.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What am I doing wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2018 11:53:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-comparing-two-timestamps-incremental-load/m-p/66262#M604756</guid>
      <dc:creator>jossebb1</dc:creator>
      <dc:date>2018-06-22T11:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with comparing two timestamps (incremental load)</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-comparing-two-timestamps-incremental-load/m-p/66263#M604758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to define the proper formatting and changing the variable-call like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Last_Updated_Date_Table:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;load&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;timestamp&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CREATE_TS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;STRONG&gt;'YYYY-MM-DD hh:mm:ss.fff'&lt;/STRONG&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Max_CREATE_TS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; TRA_Max;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;WHERE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;MAINDB&lt;SPAN style="font-size: 8pt;"&gt;.CREATE_TS &amp;gt;= &lt;STRONG&gt;'$(Last_Transaction)'&lt;/STRONG&gt; AND&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;MAINDB&lt;/SPAN&gt;.TRA_TYPE IN ('AAAA', 'BBBB') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 09:12:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-comparing-two-timestamps-incremental-load/m-p/66263#M604758</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-06-25T09:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with comparing two timestamps (incremental load)</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-comparing-two-timestamps-incremental-load/m-p/66264#M604759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for your help, I just tried it and it works!!&lt;/P&gt;&lt;P&gt;Really great, thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 12:49:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-comparing-two-timestamps-incremental-load/m-p/66264#M604759</guid>
      <dc:creator>jossebb1</dc:creator>
      <dc:date>2018-06-25T12:49:34Z</dc:date>
    </item>
  </channel>
</rss>

