<?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: Load Script change by date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046759#M635796</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a second part to this question.&amp;nbsp; Is it possible to check the modification date of a file from the load script?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 May 2016 10:57:22 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-05-02T10:57:22Z</dc:date>
    <item>
      <title>Load Script change by date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046756#M635793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to load two different sets of data depending on the date. From the first business day of the month to some date around the 14th of the month, one set of data is used. This is preliminary data.&amp;nbsp; From some date around the 14th of the month to the last business day of the month, different data is used.&amp;nbsp; This is Final data.&amp;nbsp; I would put an update date into a SQL table when the data is updated mid month.&amp;nbsp; That way I can check to see if the final data has been updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to read the update date and then load the proper set of data? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am thinking "IF Month(today) is greater than Month(update date) then load the final data, else load the preliminary data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 13:17:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046756#M635793</guid>
      <dc:creator />
      <dc:date>2016-04-29T13:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Load Script change by date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046757#M635794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if day(today()) &amp;lt;= 14 then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; load * from preliminary;&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; load * from final;&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 13:21:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046757#M635794</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-04-29T13:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Load Script change by date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046758#M635795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;load data and add this&lt;/P&gt;&lt;P&gt;if(day(today()&amp;gt;15,1,0) as flag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 13:23:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046758#M635795</guid>
      <dc:creator>florentina_doga</dc:creator>
      <dc:date>2016-04-29T13:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Load Script change by date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046759#M635796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a second part to this question.&amp;nbsp; Is it possible to check the modification date of a file from the load script?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2016 10:57:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046759#M635796</guid>
      <dc:creator />
      <dc:date>2016-05-02T10:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Load Script change by date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046760#M635797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could query this with the qv-filefunctions like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filetime('YourFile')&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, 02 May 2016 11:00:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046760#M635797</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-05-02T11:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: Load Script change by date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046761#M635798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is what I am trying to do.&amp;nbsp; I don't think I have the correct syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(filetime('\\Server\working\Inputs\Preliminary.csv') &amp;gt; filetime('\\Server\working\Inputs\Final.txt'),&lt;/P&gt;&lt;P&gt;SELECT *&lt;BR /&gt;FROM "MyDB".dbo.Preliminary;&lt;BR /&gt;,&lt;/P&gt;&lt;P&gt;SELECT* &lt;BR /&gt;FROM "MyDB".dbo.Final;&lt;BR /&gt;);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2016 12:28:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046761#M635798</guid>
      <dc:creator />
      <dc:date>2016-05-02T12:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Load Script change by date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046762#M635799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try it in this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If filetime('\\Server\working\Inputs\Preliminary.csv') &amp;gt; filetime('\\Server\working\Inputs\Final.txt') then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * FROM "MyDB".dbo.Preliminary;&lt;BR /&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * FROM "MyDB".dbo.Final;&lt;BR /&gt;end if&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, 02 May 2016 12:31:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046762#M635799</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-05-02T12:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Load Script change by date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046763#M635800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frank, there are two 'If', in this case you're using 'If' as script control sentence, so you must use the syntaxis provided by Marcus.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Script control statement: If...then...elseif...endif&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/ScriptControlStatements/script-control-statements.htm" title="https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/ScriptControlStatements/script-control-statements.htm"&gt;https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/ScriptControlStatements/script-control-sta…&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Conditional function: In format If(Condition, then, else)&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/ConditionalFunctions/if.htm" title="https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/ConditionalFunctions/if.htm"&gt;https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/ConditionalFunctions/if.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2016 12:42:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046763#M635800</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-05-02T12:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Load Script change by date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046764#M635801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Marcus.&amp;nbsp; I looked at you earlier reply and it worked after using that syntax.&amp;nbsp; I just need to load that into a table.&amp;nbsp; Whenever I put a table name (MyTable:) in front of it, it errors out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2016 12:47:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046764#M635801</guid>
      <dc:creator />
      <dc:date>2016-05-02T12:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Load Script change by date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046765#M635802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frank, try setting the name in each block of the 'IF':&lt;/P&gt;&lt;P&gt;If filetime('\\Server\working\Inputs\Preliminary.csv') &amp;gt; filetime('\\Server\working\Inputs\Final.txt') then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TableName:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * FROM "MyDB".dbo.Preliminary;&lt;BR /&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TableName:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * FROM "MyDB".dbo.Final;&lt;BR /&gt;end if&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2016 12:51:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Script-change-by-date/m-p/1046765#M635802</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-05-02T12:51:46Z</dc:date>
    </item>
  </channel>
</rss>

