<?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: Replace load issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Replace-load-issue/m-p/944556#M648870</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this &lt;A href="https://community.qlik.com/message/290234"&gt;Re: Partial Reload: REPLACE/ADD LOAD returns script errors before loading&lt;/A&gt; and this &lt;A href="https://community.qlik.com/message/864844"&gt;Re: Add, Add Only and Replace, Replce Only&lt;/A&gt; is helpful for you.&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, 14 Sep 2015 14:25:04 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2015-09-14T14:25:04Z</dc:date>
    <item>
      <title>Replace load issue</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-load-issue/m-p/944555#M648869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to use the following script in a Partial Reload, but if you add the REPLACE function the script doesn't perform the same way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone see why or a way around the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without 'Replace' (works well)&lt;/P&gt;&lt;P&gt;//====================================================================&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Table1:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;load * inline [&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;ID,name,type,value&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;1,A,blue,10&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;1,A,yellow,50&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;3,C,red,80&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;3,C,yellow,60&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;4,D,yellow,40&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Table2:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;generic load *&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;resident Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;ResultTable: &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;load Distinct ID, name Resident Table1; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FOR i = 0 to NoOfTables() &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; TableList: &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; load TableName($(i)) as Tablename AUTOGENERATE 1 &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; WHERE WildMatch(TableName($(i)), 'Table2.*'); &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;NEXT i &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FOR i = 1 to FieldValueCount('Tablename') &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; LET vTable = FieldValue('Tablename', $(i)); &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; LEFT JOIN (ResultTable) load * RESIDENT [$(vTable)]; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; DROP TABLE [$(vTable)]; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;NEXT i &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Drop Tables Table1, TableList;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;//====================================================================&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;With 'Replace' (doesn't work)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;//====================================================================&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Table1:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;replace load * inline [&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;ID,name,type,value&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;1,A,blue,10&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;1,A,yellow,50&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;3,C,red,80&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;3,C,yellow,60&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;4,D,yellow,40&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Table2:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;generic replace load *&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;resident Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;ResultTable: &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;replace load Distinct ID, name Resident Table1; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FOR i = 0 to NoOfTables() &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; TableList: &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; replace load TableName($(i)) as Tablename AUTOGENERATE 1 &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; WHERE WildMatch(TableName($(i)), 'Table2.*'); &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;NEXT i &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FOR i = 1 to FieldValueCount('Tablename') &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; LET vTable = FieldValue('Tablename', $(i)); &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; LEFT JOIN (ResultTable) replace load * RESIDENT [$(vTable)]; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; DROP TABLE [$(vTable)]; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;NEXT i &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Drop Tables Table1, TableList;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;//====================================================================&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 14:13:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-load-issue/m-p/944555#M648869</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-14T14:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Replace load issue</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-load-issue/m-p/944556#M648870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this &lt;A href="https://community.qlik.com/message/290234"&gt;Re: Partial Reload: REPLACE/ADD LOAD returns script errors before loading&lt;/A&gt; and this &lt;A href="https://community.qlik.com/message/864844"&gt;Re: Add, Add Only and Replace, Replce Only&lt;/A&gt; is helpful for you.&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, 14 Sep 2015 14:25:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-load-issue/m-p/944556#M648870</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-09-14T14:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Replace load issue</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-load-issue/m-p/944557#M648871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your issue is here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FOR i = 0 to NoOfTables()&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; TableList:&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; replace load TableName($(i)) as Tablename AUTOGENERATE 1&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; WHERE WildMatch(TableName($(i)), 'Table2.*');&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;NEXT i&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;This doesn't build the list of generic tables because it is getting replaced during each iteration of the loop. So in the end you only end up with one record in this table and it only joins one of the generic tables to your final table.&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Is there a reason you are using the replace? Is it for partial reloading? I think because it is a table you end up dropping, you could use the add keyword instead of replace and be ok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 14:25:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-load-issue/m-p/944557#M648871</guid>
      <dc:creator>dclark0699</dc:creator>
      <dc:date>2015-09-14T14:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Replace load issue</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-load-issue/m-p/944558#M648872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes it is for partial reloading for Section Access so i can always load my latest security file even if the application data has not changed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 15:27:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-load-issue/m-p/944558#M648872</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-14T15:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Replace load issue</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-load-issue/m-p/944559#M648873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I amened the script and this seems to work well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF IsPartialReload()=-1 THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP TABLE ResultTable;&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;replace load * inline [&lt;/P&gt;&lt;P&gt;ID,name,type,value&lt;/P&gt;&lt;P&gt;1,A,blue,10&lt;/P&gt;&lt;P&gt;1,A,yellow,50&lt;/P&gt;&lt;P&gt;3,C,red,80&lt;/P&gt;&lt;P&gt;3,C,yellow,60&lt;/P&gt;&lt;P&gt;4,D,yellow,40&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;GENERIC REPLACE LOAD * RESIDENT Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ResultTable: &lt;/P&gt;&lt;P&gt;REPLACE LOAD DISTINCT ID, name RESIDENT Table1; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR i = 0 to NoOfTables()&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NoConcatenate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TableList$(i):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REPLACE LOAD TableName($(i)) AS Tablename AUTOGENERATE 1 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE WildMatch(TableName($(i)), 'Table2.*');&lt;/P&gt;&lt;P&gt;NEXT i&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET ii = $(i)-1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR i = 1 to FieldValueCount('Tablename') &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vTable = FieldValue('Tablename', $(i)); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LEFT JOIN (ResultTable) REPLACE LOAD * RESIDENT [$(vTable)]; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP TABLE [$(vTable)]; &lt;/P&gt;&lt;P&gt;NEXT i &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR i = 0 to ii&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP TABLE TableList$(i);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;NEXT i;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 07:11:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-load-issue/m-p/944559#M648873</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-15T07:11:49Z</dc:date>
    </item>
  </channel>
</rss>

