<?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 using a unique key in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Incremental-Load-using-a-unique-key/m-p/1564607#M741793</link>
    <description>&lt;P&gt;I have a table of Vulnerabilities (lets say date is 01/04/2019&lt;/P&gt;&lt;P&gt;I load this table and then this creates an nPrinting report the same week..&lt;/P&gt;&lt;P&gt;It comprises of %Vulnerability and [Vulnerability Date] and a Comment&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then reload this nPrinting report&amp;nbsp; 01/04/2019into QlikView and load this weeks file 07/04/2019 and concatenate and save this into a QVD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am trying to achieve is&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Whenever a comment is inputted in the nprinting report and that is reloaded, then to take that comment and put it in the newest weekly file Comment row.&lt;/LI&gt;&lt;LI&gt;If&amp;nbsp; %vulnerability from the two different dates match, I want to delete the oldest %vulnerability and only use the newest %Vulnerability.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I am trying to use Incremental load and it keeps doubling my numbers which means its not deleting the&lt;/P&gt;&lt;PRE&gt;Report:
LOAD 
 IF(
      @7 &amp;amp; '-' &amp;amp; 
      ApplyMap('Qualys_Hostname', @1, 'OTHER') &amp;amp; '-' &amp;amp; 
      ApplyMap('Qualys_Description', @1, 'OTHER') &amp;amp; '-' &amp;amp; 
      IF(TextBetween(MapSubString( 'Keyword_Mapping' , @8), '/', '\') = '/SSL', 'SSL', TextBetween(MapSubString( 'Keyword_Mapping' , @8), '/', '\')) = '-OTHER-OTHER-', NULL(),
      IF(
      	@7 &amp;amp; '-' &amp;amp; 
      	ApplyMap('Qualys_Hostname', @1, 'OTHER') &amp;amp; '-' &amp;amp; 
     	ApplyMap('Qualys_Description', @1, 'OTHER') &amp;amp; '-' &amp;amp; 
      	IF(TextBetween(MapSubString( 'Keyword_Mapping' , @8), '/', '\') = '/SSL', 'SSL', TextBetween(MapSubString( 'Keyword_Mapping' , @8), '/', '\')) = '-', NULL(),
      @7 &amp;amp; '-' &amp;amp; 
      ApplyMap('Qualys_Hostname', @1, 'OTHER') &amp;amp; '-' &amp;amp; 
      ApplyMap('Qualys_Description', @1, 'OTHER') &amp;amp; '-' &amp;amp; 
      IF(TextBetween(MapSubString( 'Keyword_Mapping' , @8), '/', '\') = '/SSL', 'SSL', TextBetween(MapSubString( 'Keyword_Mapping' , @8), '/', '\'))))
																					as %Vulnerability,
'' 																					as Comment,
	 
     Date(Date#(left(SubField(FileName(), '_', 3),8), 'DDMMYYYY'),'DD-MM-YYYY')				as [Vulnerability Date]
FROM
[$(vSource)\CSVs\Scan_Report_*$(vcurrentyear).csv]
(txt, codepage is 1252, explicit labels, delimiter is ',', msq, header is 4 lines)
//where Date(Date#(left(SubField(FileName(), '_', 3),8), 'DDMMYYYY'),'DD/MM/YYYY') &amp;gt; $(Last_Updated_Date)
;
Last_Updated_Date:
LOAD Date(max([Vulnerability Date])) as Max_Date
Resident Report;

Let Last_Updated_Date = peek('Max_Date', -1, 'Last_Updated_Date');
TRACE &amp;gt;&amp;gt;&amp;gt; $(Last_Updated_Date);

Concatenate
LOAD 
	 %Vulnerability, 
          [Vulnerability Date],
          Comment
From
Report_Comment.qvd where not exists %Vulnerability;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 03:57:54 GMT</pubDate>
    <dc:creator>bobbydave</dc:creator>
    <dc:date>2024-11-16T03:57:54Z</dc:date>
    <item>
      <title>Incremental Load using a unique key</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-using-a-unique-key/m-p/1564607#M741793</link>
      <description>&lt;P&gt;I have a table of Vulnerabilities (lets say date is 01/04/2019&lt;/P&gt;&lt;P&gt;I load this table and then this creates an nPrinting report the same week..&lt;/P&gt;&lt;P&gt;It comprises of %Vulnerability and [Vulnerability Date] and a Comment&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then reload this nPrinting report&amp;nbsp; 01/04/2019into QlikView and load this weeks file 07/04/2019 and concatenate and save this into a QVD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am trying to achieve is&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Whenever a comment is inputted in the nprinting report and that is reloaded, then to take that comment and put it in the newest weekly file Comment row.&lt;/LI&gt;&lt;LI&gt;If&amp;nbsp; %vulnerability from the two different dates match, I want to delete the oldest %vulnerability and only use the newest %Vulnerability.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I am trying to use Incremental load and it keeps doubling my numbers which means its not deleting the&lt;/P&gt;&lt;PRE&gt;Report:
LOAD 
 IF(
      @7 &amp;amp; '-' &amp;amp; 
      ApplyMap('Qualys_Hostname', @1, 'OTHER') &amp;amp; '-' &amp;amp; 
      ApplyMap('Qualys_Description', @1, 'OTHER') &amp;amp; '-' &amp;amp; 
      IF(TextBetween(MapSubString( 'Keyword_Mapping' , @8), '/', '\') = '/SSL', 'SSL', TextBetween(MapSubString( 'Keyword_Mapping' , @8), '/', '\')) = '-OTHER-OTHER-', NULL(),
      IF(
      	@7 &amp;amp; '-' &amp;amp; 
      	ApplyMap('Qualys_Hostname', @1, 'OTHER') &amp;amp; '-' &amp;amp; 
     	ApplyMap('Qualys_Description', @1, 'OTHER') &amp;amp; '-' &amp;amp; 
      	IF(TextBetween(MapSubString( 'Keyword_Mapping' , @8), '/', '\') = '/SSL', 'SSL', TextBetween(MapSubString( 'Keyword_Mapping' , @8), '/', '\')) = '-', NULL(),
      @7 &amp;amp; '-' &amp;amp; 
      ApplyMap('Qualys_Hostname', @1, 'OTHER') &amp;amp; '-' &amp;amp; 
      ApplyMap('Qualys_Description', @1, 'OTHER') &amp;amp; '-' &amp;amp; 
      IF(TextBetween(MapSubString( 'Keyword_Mapping' , @8), '/', '\') = '/SSL', 'SSL', TextBetween(MapSubString( 'Keyword_Mapping' , @8), '/', '\'))))
																					as %Vulnerability,
'' 																					as Comment,
	 
     Date(Date#(left(SubField(FileName(), '_', 3),8), 'DDMMYYYY'),'DD-MM-YYYY')				as [Vulnerability Date]
FROM
[$(vSource)\CSVs\Scan_Report_*$(vcurrentyear).csv]
(txt, codepage is 1252, explicit labels, delimiter is ',', msq, header is 4 lines)
//where Date(Date#(left(SubField(FileName(), '_', 3),8), 'DDMMYYYY'),'DD/MM/YYYY') &amp;gt; $(Last_Updated_Date)
;
Last_Updated_Date:
LOAD Date(max([Vulnerability Date])) as Max_Date
Resident Report;

Let Last_Updated_Date = peek('Max_Date', -1, 'Last_Updated_Date');
TRACE &amp;gt;&amp;gt;&amp;gt; $(Last_Updated_Date);

Concatenate
LOAD 
	 %Vulnerability, 
          [Vulnerability Date],
          Comment
From
Report_Comment.qvd where not exists %Vulnerability;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:57:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-using-a-unique-key/m-p/1564607#M741793</guid>
      <dc:creator>bobbydave</dc:creator>
      <dc:date>2024-11-16T03:57:54Z</dc:date>
    </item>
  </channel>
</rss>

