<?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 SQL 'Where' Condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-Where-Condition/m-p/155259#M31573</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming you are using SQL Server it would be something like...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;where DATEDIFF(dd, "Leave From Date", "System Date") &amp;lt; 3&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Documentation on syntax of datediff can be found here... &lt;A href="http://msdn.microsoft.com/en-us/library/aa258269(SQL.80).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa258269(SQL.80).aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 May 2010 05:26:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-19T05:26:08Z</dc:date>
    <item>
      <title>SQL 'Where' Condition</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Where-Condition/m-p/155258#M31572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am currently creating a report that shows employees who applied leave late (at least 3 days before the actual leave day). I used a pivot table with expression of (LateLeaveApp &amp;lt; 3).&lt;/P&gt;&lt;P&gt;I would like to know how i can add sql condition statement under where clause to load only records that the difference between "Leave From Date" and "System Date" is less than 3.&lt;/P&gt;&lt;P&gt;Next, is it possible to hide my expression column under the pivot table?&lt;/P&gt;&lt;P&gt;[My Qlikview Report]&lt;/P&gt;&lt;P&gt;LOAD "Employee No_",&lt;BR /&gt; date("Leave From Date"),&lt;BR /&gt; date("Leave To Date"),&lt;BR /&gt; "Leave Type",&lt;BR /&gt; "Reason for Application",&lt;BR /&gt; Date("Leave From Date") - Date("System Date") as LateLeaveApp,&lt;BR /&gt; Year("System Date"),&lt;BR /&gt; "Entry Type",&lt;BR /&gt; date("System Date");&lt;BR /&gt;SQL SELECT "Employee No_",&lt;BR /&gt; "Leave From Date",&lt;BR /&gt; "Leave To Date",&lt;BR /&gt; "Leave Type",&lt;BR /&gt; "Entry Type",&lt;BR /&gt; "Reason for Application",&lt;BR /&gt; "System Date"&lt;BR /&gt;FROM ENSURE.dbo."Ensure Engineering (Live)$Leave Application"&lt;BR /&gt;where ("Employee No_" Between '2' and '5999') AND "Entry Type" = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your kind guidance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 May 2010 04:07:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Where-Condition/m-p/155258#M31572</guid>
      <dc:creator />
      <dc:date>2010-05-19T04:07:39Z</dc:date>
    </item>
    <item>
      <title>SQL 'Where' Condition</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Where-Condition/m-p/155259#M31573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming you are using SQL Server it would be something like...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;where DATEDIFF(dd, "Leave From Date", "System Date") &amp;lt; 3&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Documentation on syntax of datediff can be found here... &lt;A href="http://msdn.microsoft.com/en-us/library/aa258269(SQL.80).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa258269(SQL.80).aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 May 2010 05:26:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Where-Condition/m-p/155259#M31573</guid>
      <dc:creator />
      <dc:date>2010-05-19T05:26:08Z</dc:date>
    </item>
  </channel>
</rss>

