<?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 Issue with Incremental reload. Losing data that should not be lost in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Issue-with-Incremental-reload-Losing-data-that-should-not-be/m-p/353002#M703086</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having an issue with incremental reload losing data. Below is a section of my script that is causing issues. I have narrowed this issue down to being caused to the WHERE NOT EXISTS part. i.e. I commented that out and the data I want shows up. I checked the first section of the SQL select and the data I want is not there, and the primarykeyJournaldtl is not there. I have no Idea what could be causing this as I have double checked to make sure it is not being loaded in the first section, and I do know that it is contained within the QVD. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is beginning to give me a major headache so any help would be appreciated. &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;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13424644271391528" jivemacro_uid="_13424644271391528"&gt;&lt;P&gt;Let ThisExecTime= num(today());&lt;/P&gt;&lt;P&gt;Let ThisExecTimeyear= year(today());&lt;/P&gt;&lt;P&gt;Let ThisExecTimemonth= num(month(today()));&lt;/P&gt;&lt;P&gt;Let ThisExecTimeday= day(today());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let LastExecTime =&amp;nbsp; ThisExecTime;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Let LastExecTimeyear=ThisExecTimeyear;&lt;/P&gt;&lt;P&gt;Let LastExecTimemonth=ThisExecTimemonth;&lt;/P&gt;&lt;P&gt;Let LastExecTimeday=ThisExecTimeday;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Journaldtl1:&lt;/P&gt;&lt;P&gt;SQL SELECT &lt;/P&gt;&lt;P&gt;company&amp;nbsp; + bookid + cast(fiscalyear as varchar)+ cast(journalcode as varchar) + cast(journalnum as varchar) &lt;/P&gt;&lt;P&gt;+ cast(journalline as varchar)&amp;nbsp; as primarykeyJournaldtl,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM gljrndtl where&lt;/P&gt;&lt;P&gt; ((CAST((&amp;nbsp; STR( ( YEAR(posteddate) ) ) + '/' +&amp;nbsp; STR( MONTH(posteddate) ) + '/' +&amp;nbsp; STR( DAY(posteddate) )&amp;nbsp; ) AS DATETIME) ) &amp;gt;=&lt;/P&gt;&lt;P&gt; CAST((&amp;nbsp; STR( ( $(LastExecTimeyear) ) ) + '/' +&amp;nbsp; STR( ($(LastExecTimemonth)) ) + '/' +&amp;nbsp; STR(($(LastExecTimeday)) )&amp;nbsp; ) AS DATETIME)&amp;nbsp; &lt;/P&gt;&lt;P&gt; AND &lt;/P&gt;&lt;P&gt; (CAST((&amp;nbsp; STR( ( YEAR(posteddate) ) ) + '/' +&amp;nbsp; STR( MONTH(posteddate) ) + '/' +&amp;nbsp; STR( DAY(posteddate) )&amp;nbsp; ) AS DATETIME) ) &amp;lt;=&lt;/P&gt;&lt;P&gt;&amp;nbsp; CAST((&amp;nbsp; STR( ( $(ThisExecTimeyear) ) ) + '/' +&amp;nbsp; STR( ($(ThisExecTimemonth)) ) + '/' +&amp;nbsp; STR(($(ThisExecTimeday)) )&amp;nbsp; ) AS DATETIME) )&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate &lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM [....qvd(qvd)] (qvd)&lt;/P&gt;&lt;P&gt;WHERE NOT EXISTS(primarykeyJournaldtl)&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inner Join SQL SELECT company,bookid,fiscalyear,journalcode,journalnum,journalline FROM gljrndtl;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jul 2012 18:51:46 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-07-16T18:51:46Z</dc:date>
    <item>
      <title>Issue with Incremental reload. Losing data that should not be lost</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-Incremental-reload-Losing-data-that-should-not-be/m-p/353002#M703086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having an issue with incremental reload losing data. Below is a section of my script that is causing issues. I have narrowed this issue down to being caused to the WHERE NOT EXISTS part. i.e. I commented that out and the data I want shows up. I checked the first section of the SQL select and the data I want is not there, and the primarykeyJournaldtl is not there. I have no Idea what could be causing this as I have double checked to make sure it is not being loaded in the first section, and I do know that it is contained within the QVD. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is beginning to give me a major headache so any help would be appreciated. &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;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13424644271391528" jivemacro_uid="_13424644271391528"&gt;&lt;P&gt;Let ThisExecTime= num(today());&lt;/P&gt;&lt;P&gt;Let ThisExecTimeyear= year(today());&lt;/P&gt;&lt;P&gt;Let ThisExecTimemonth= num(month(today()));&lt;/P&gt;&lt;P&gt;Let ThisExecTimeday= day(today());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let LastExecTime =&amp;nbsp; ThisExecTime;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Let LastExecTimeyear=ThisExecTimeyear;&lt;/P&gt;&lt;P&gt;Let LastExecTimemonth=ThisExecTimemonth;&lt;/P&gt;&lt;P&gt;Let LastExecTimeday=ThisExecTimeday;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Journaldtl1:&lt;/P&gt;&lt;P&gt;SQL SELECT &lt;/P&gt;&lt;P&gt;company&amp;nbsp; + bookid + cast(fiscalyear as varchar)+ cast(journalcode as varchar) + cast(journalnum as varchar) &lt;/P&gt;&lt;P&gt;+ cast(journalline as varchar)&amp;nbsp; as primarykeyJournaldtl,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM gljrndtl where&lt;/P&gt;&lt;P&gt; ((CAST((&amp;nbsp; STR( ( YEAR(posteddate) ) ) + '/' +&amp;nbsp; STR( MONTH(posteddate) ) + '/' +&amp;nbsp; STR( DAY(posteddate) )&amp;nbsp; ) AS DATETIME) ) &amp;gt;=&lt;/P&gt;&lt;P&gt; CAST((&amp;nbsp; STR( ( $(LastExecTimeyear) ) ) + '/' +&amp;nbsp; STR( ($(LastExecTimemonth)) ) + '/' +&amp;nbsp; STR(($(LastExecTimeday)) )&amp;nbsp; ) AS DATETIME)&amp;nbsp; &lt;/P&gt;&lt;P&gt; AND &lt;/P&gt;&lt;P&gt; (CAST((&amp;nbsp; STR( ( YEAR(posteddate) ) ) + '/' +&amp;nbsp; STR( MONTH(posteddate) ) + '/' +&amp;nbsp; STR( DAY(posteddate) )&amp;nbsp; ) AS DATETIME) ) &amp;lt;=&lt;/P&gt;&lt;P&gt;&amp;nbsp; CAST((&amp;nbsp; STR( ( $(ThisExecTimeyear) ) ) + '/' +&amp;nbsp; STR( ($(ThisExecTimemonth)) ) + '/' +&amp;nbsp; STR(($(ThisExecTimeday)) )&amp;nbsp; ) AS DATETIME) )&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate &lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM [....qvd(qvd)] (qvd)&lt;/P&gt;&lt;P&gt;WHERE NOT EXISTS(primarykeyJournaldtl)&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inner Join SQL SELECT company,bookid,fiscalyear,journalcode,journalnum,journalline FROM gljrndtl;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 18:51:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-Incremental-reload-Losing-data-that-should-not-be/m-p/353002#M703086</guid>
      <dc:creator />
      <dc:date>2012-07-16T18:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Incremental reload. Losing data that should not be lost</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-Incremental-reload-Losing-data-that-should-not-be/m-p/353003#M703087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you try to load both the data after commenting out &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;CODE class="jive-code"&gt;WHERE NOT EXISTS(primarykeyJournaldtl)&lt;/CODE&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you see any duplicate values in the field &lt;SPAN style="font-family: monospace;"&gt;primarykeyJournaldtl&lt;/SPAN&gt; ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 19:10:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-Incremental-reload-Losing-data-that-should-not-be/m-p/353003#M703087</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2012-07-16T19:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Incremental reload. Losing data that should not be lost</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-Incremental-reload-Losing-data-that-should-not-be/m-p/353004#M703088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the issue. It was along the lines of say&lt;/P&gt;&lt;P&gt;Journal Number=1362&lt;/P&gt;&lt;P&gt;Journal line=2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then I had another entry where&lt;/P&gt;&lt;P&gt;Journal Number=136&lt;/P&gt;&lt;P&gt;Journal line=22&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;giving me the same key. I will add '-' between the values to avoid this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 19:23:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-Incremental-reload-Losing-data-that-should-not-be/m-p/353004#M703088</guid>
      <dc:creator />
      <dc:date>2012-07-16T19:23:10Z</dc:date>
    </item>
  </channel>
</rss>

