<?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: Conditional Load SQL in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-Load-SQL/m-p/1509159#M600154</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm using SQL Statement in QVW , without load statement also this works.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;AS&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Nov 2018 15:21:33 GMT</pubDate>
    <dc:creator>amit_saini</dc:creator>
    <dc:date>2018-11-19T15:21:33Z</dc:date>
    <item>
      <title>Conditional Load SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Load-SQL/m-p/1508920#M600149</link>
      <description>&lt;P&gt;Hello Folks,&lt;/P&gt;&lt;P&gt;I'm using below simple script :&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;BR /&gt;FROM "TEST".dbo.CAQ&lt;BR /&gt;where [Date] &amp;gt; '2018-11-19 09:46:00' AND [Date] &amp;lt;= '2018-11-19 9:47:00';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm looking for it to set a dynamic where condition , I just want to load the data between Max(Date) timestamp with a range of 1 minute.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[Date] &amp;gt; '2018-11-12 09:&lt;FONT color="#FF0000"&gt;46:00&lt;/FONT&gt;' AND [Date] &amp;lt;= '2018-11-12 09:&lt;FONT color="#FF0000"&gt;47:00&lt;/FONT&gt;';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I set this where condition , please help!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 11:00:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Load-SQL/m-p/1508920#M600149</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2018-11-19T11:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Load SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Load-SQL/m-p/1508959#M600150</link>
      <description>&lt;P&gt;This doesn't appear a Qlik question.. you're seemingly trying to change your SQL, as I don't see any load statements. Looks like SQL Server syntax.&lt;/P&gt;&lt;P&gt;MAX(date) OVER (PARTITION BY group) will get the max date. DateAdd(minute,-1,date) can be used to remove a minute.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 11:45:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Load-SQL/m-p/1508959#M600150</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2018-11-19T11:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Load SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Load-SQL/m-p/1508968#M600151</link>
      <description>&lt;P&gt;You could try something like the following to loop through a days worth of minutes&lt;/P&gt;&lt;P&gt;Include a SQL call where the trace statement is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="1"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;I&gt;&lt;FONT color="#808080" size="1"&gt;vDate&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt;= &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;Makedate&lt;/FONT&gt;&lt;FONT size="1"&gt;(2018, 11, 11) * 1440; &lt;/FONT&gt;&lt;FONT color="#008000" size="1"&gt;//date, expressed in minutes&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;LET&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;I&gt;&lt;FONT color="#808080" size="1"&gt;vDateEnd&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt; = &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;vDate&lt;/FONT&gt;&lt;FONT size="1"&gt; + 1440; &lt;/FONT&gt;&lt;FONT color="#008000" size="1"&gt;//end date, expressed in minutes&lt;BR /&gt;&amp;nbsp;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;let&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;I&gt;&lt;FONT color="#808080" size="1"&gt;vPreviousTimeStamp&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt; = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;Timestamp&lt;/FONT&gt;&lt;FONT size="1"&gt;(&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;vDate&lt;/FONT&gt;&lt;FONT size="1"&gt;/1440);&lt;BR /&gt;&amp;nbsp;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;for&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;I&gt;&lt;FONT color="#808080" size="1"&gt;n&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt; = &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;vDate&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;to&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;vDateEnd&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;let&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;I&gt;&lt;FONT color="#808080" size="1"&gt;vCurrentTimeStamp&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt; = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;Timestamp&lt;/FONT&gt;&lt;FONT size="1"&gt;((&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;n&lt;/FONT&gt;&lt;FONT size="1"&gt;+1)/1440);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;TRACE&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;I&gt;&lt;FONT color="#808080" size="1"&gt;$(vPreviousTimeStamp)&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt; to &lt;/FONT&gt;&lt;STRONG&gt;&lt;I&gt;&lt;FONT color="#808080" size="1"&gt;$(vCurrentTimeStamp)&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt;;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color="#008000" size="1"&gt;//put your sql statement here, substituting in $(vPreviousTimeStamp) and $(vCurrentTimeStamp)&lt;BR /&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT size="1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;let&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;I&gt;&lt;FONT color="#808080" size="1"&gt;vPreviousTimeStamp&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt; = &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;vCurrentTimeStamp&lt;/FONT&gt;&lt;FONT size="1"&gt;;&lt;BR /&gt;&amp;nbsp;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;next&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;I&gt;&lt;FONT color="#808080" size="1"&gt;n&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 11:50:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Load-SQL/m-p/1508968#M600151</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2018-11-19T11:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Load SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Load-SQL/m-p/1508991#M600152</link>
      <description>&lt;P&gt;May be something like this&lt;/P&gt;&lt;PRE&gt;SQL SELECT *
FROM "TEST".dbo.CAQ t1,
(SELECT Max(Date) as Max,
   Max(Date) - (1/1440) as Min
FROM "TEST".dbo.CAQ) t2
Where [t1.Date] &amp;gt; t2.Min AND [Date] &amp;lt;= t2.Max;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Nov 2018 12:05:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Load-SQL/m-p/1508991#M600152</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-11-19T12:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Load SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Load-SQL/m-p/1509054#M600153</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please remember to post questions related to the product in the correct discussion board.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the list of discussion board for qlik products,&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Products/ct-p/qlik-products" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Products/ct-p/qlik-products&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This post will be moved to the correct discussion board soon.&lt;/P&gt;&lt;P&gt;Thanks,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Pablo&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 12:50:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Load-SQL/m-p/1509054#M600153</guid>
      <dc:creator>pablolabbe</dc:creator>
      <dc:date>2018-11-19T12:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Load SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Load-SQL/m-p/1509159#M600154</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm using SQL Statement in QVW , without load statement also this works.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;AS&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 15:21:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Load-SQL/m-p/1509159#M600154</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2018-11-19T15:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Load SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Load-SQL/m-p/1509181#M600155</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/36319"&gt;@amit_saini&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm using SQL Statement in QVW , without load statement also this works.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;AS&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes, but the point is - you're not actually asking anything related to Qlik. Your question is how to modify an SQL query to return specific data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In any case, the solution I suggested above should work if you're working with Microsoft SQL Server. Since SQL syntax is provider-specific, it may not work for other DBs.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 15:59:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Load-SQL/m-p/1509181#M600155</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2018-11-19T15:59:41Z</dc:date>
    </item>
  </channel>
</rss>

