<?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: Exclude rows from SQL Data with multiple conditions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Exclude-rows-from-SQL-Data-with-multiple-conditions/m-p/113982#M753844</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you exclude the data in the sql itself? This will help you bring less number of rows from sql itself. If you still want to do it in Load, then you need to put your where statement before Select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;1,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;WHERE not(1='0' and 2='0' and 3='0' and&amp;nbsp; 4='0' and 5='0' and 6 &amp;lt; Date(MonthStart(AddMonths(Today(), -37)), 'YYYY-MM-DD'))&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;SQL SELECT *&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;FROM "Number".dbo."Equation"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Oct 2018 18:06:12 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-10-17T18:06:12Z</dc:date>
    <item>
      <title>Exclude rows from SQL Data with multiple conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-rows-from-SQL-Data-with-multiple-conditions/m-p/113981#M753843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;Hello Qlik Experts,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: 'times new roman', times;"&gt;I am new to Qlik, I am trying to pull the data SQL and store into QVD's. In the preceding load I need to apply certain condition in order to exclude some unnecessary rows and they have some conditions to be excluded. Below is the&amp;nbsp; example script I'm using to exclude the rows.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: 'times new roman', times;"&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: 'times new roman', times;"&gt;1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: 'times new roman', times;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: 'times new roman', times;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: 'times new roman', times;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: 'times new roman', times;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: 'times new roman', times;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: 'times new roman', times;"&gt;SQL SELECT *&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: 'times new roman', times;"&gt;FROM "Number".dbo."Equation"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: 'times new roman', times;"&gt;WHERE not(1='0' and 2='0' and 3='0' and&amp;nbsp; 4='0' and 5='0' and 6 &amp;lt; Date(MonthStart(AddMonths(Today(), -37)), 'YYYY-MM-DD'));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: 'times new roman', times;"&gt;For Column 6(it is a date column) the condition is it should not load data which is 37 months old and this should be recurring. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: 'times new roman', times;"&gt;Just want to know If I am right with my script and please suggest if you any good ideas to do so??&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;Thanks in &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;Advance&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-rows-from-SQL-Data-with-multiple-conditions/m-p/113981#M753843</guid>
      <dc:creator>CVR</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude rows from SQL Data with multiple conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-rows-from-SQL-Data-with-multiple-conditions/m-p/113982#M753844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you exclude the data in the sql itself? This will help you bring less number of rows from sql itself. If you still want to do it in Load, then you need to put your where statement before Select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;1,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;WHERE not(1='0' and 2='0' and 3='0' and&amp;nbsp; 4='0' and 5='0' and 6 &amp;lt; Date(MonthStart(AddMonths(Today(), -37)), 'YYYY-MM-DD'))&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;SQL SELECT *&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;FROM "Number".dbo."Equation"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'times new roman', times;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 18:06:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-rows-from-SQL-Data-with-multiple-conditions/m-p/113982#M753844</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-10-17T18:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude rows from SQL Data with multiple conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-rows-from-SQL-Data-with-multiple-conditions/m-p/113983#M753845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-top: 4.8pt; margin-bottom: 2.4pt;"&gt;Thanks for quick reply Sunny. You are right ,I can exclude the DATA in SQL but unfortunately I am not allowed to do so in our SQL DB. I will reload the QVW with your above script and will let you know the result. Can you also please confirm if the below script is correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 4.8pt; margin-bottom: 2.4pt;"&gt; LOAD &lt;/P&gt;&lt;P style="margin-top: 4.8pt; margin-bottom: 2.4pt;"&gt; OrderDate,&lt;/P&gt;&lt;P style="margin-top: 4.8pt; margin-bottom: 2.4pt;"&gt; Quantity&lt;/P&gt;&lt;P style="margin-top: 4.8pt; margin-bottom: 2.4pt;"&gt; WHERE NOT (OrderDate &amp;lt; Date(MonthStart(AddMonths(Today(), -37)), 'YYYY-MM-DD'))&lt;/P&gt;&lt;P style="margin-top: 4.8pt; margin-bottom: 2.4pt;"&gt; SQL SELECT *&lt;/P&gt;&lt;P style="margin-top: 4.8pt; margin-bottom: 2.4pt;"&gt; FROM "Sales".dbo."Product"; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 4.8pt; margin-bottom: 2.4pt;"&gt;Script looks good for me don't know why I am getting an error message (red line) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 4.8pt; margin-bottom: 2.4pt;"&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 18:37:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-rows-from-SQL-Data-with-multiple-conditions/m-p/113983#M753845</guid>
      <dc:creator>CVR</dc:creator>
      <dc:date>2018-10-17T18:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude rows from SQL Data with multiple conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-rows-from-SQL-Data-with-multiple-conditions/m-p/113984#M753846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are missing a semi colon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OrderDate,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Quantity&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WHERE NOT (OrderDate &amp;lt; Date(MonthStart(AddMonths(Today(), -37)), 'YYYY-MM-DD'))&lt;SPAN style="color: #ff0000; font-size: 14pt;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SQL SELECT *&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 4.8pt 0 2.4pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;FROM "Sales".dbo."Product";&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 18:55:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-rows-from-SQL-Data-with-multiple-conditions/m-p/113984#M753846</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-10-17T18:55:57Z</dc:date>
    </item>
  </channel>
</rss>

