<?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 Quantity work conditions in SQL query in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Quantity-work-conditions-in-SQL-query/m-p/1348166#M617352</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day!&lt;/P&gt;&lt;P&gt;I have simple table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 256px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="64"&gt;Field1&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Field2&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Field3&lt;/TD&gt;&lt;TD class="xl68" style="border-left: none;" width="64"&gt;Field4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;54&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;23&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;444&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;32&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;43&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;55&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;6445&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;435&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;43534&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;122&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;444&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;35&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;My task is to write SQL select query, which must get me rows, &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;for which quantity of worked conditions=2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and only those records, for which quantity of worked below conditions=2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;1. Field1&amp;gt;Field2&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;2. Field3=444&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;3. Field4&amp;gt;32&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In result i need get only first 2 records:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 256px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="64"&gt;Field1&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Field2&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Field3&lt;/TD&gt;&lt;TD class="xl68" style="border-left: none;" width="64"&gt;Field4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;54&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;23&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;444&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;32&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Jun 2017 07:08:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-23T07:08:00Z</dc:date>
    <item>
      <title>Quantity work conditions in SQL query</title>
      <link>https://community.qlik.com/t5/QlikView/Quantity-work-conditions-in-SQL-query/m-p/1348166#M617352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day!&lt;/P&gt;&lt;P&gt;I have simple table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 256px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="64"&gt;Field1&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Field2&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Field3&lt;/TD&gt;&lt;TD class="xl68" style="border-left: none;" width="64"&gt;Field4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;54&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;23&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;444&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;32&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;43&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;55&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;6445&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;435&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;43534&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;122&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;444&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;35&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;My task is to write SQL select query, which must get me rows, &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;for which quantity of worked conditions=2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and only those records, for which quantity of worked below conditions=2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;1. Field1&amp;gt;Field2&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;2. Field3=444&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;3. Field4&amp;gt;32&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In result i need get only first 2 records:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 256px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="64"&gt;Field1&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Field2&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Field3&lt;/TD&gt;&lt;TD class="xl68" style="border-left: none;" width="64"&gt;Field4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;54&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;23&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;444&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;32&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2017 07:08:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Quantity-work-conditions-in-SQL-query/m-p/1348166#M617352</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-23T07:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Quantity work conditions in SQL query</title>
      <link>https://community.qlik.com/t5/QlikView/Quantity-work-conditions-in-SQL-query/m-p/1348167#M617353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this? I am not sure why you want Field3 - 12 in the result, Because we are filtering the only 444 from that table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load Field1, Field2, Field3, Field4 Where Field1 &amp;gt; Field2 and Field3 = 444 and Field4 &amp;gt; 32;&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;/P&gt;&lt;P&gt;Field1, Field2, Field3, Field4&lt;/P&gt;&lt;P&gt;12, 0, 12, 54&lt;/P&gt;&lt;P&gt;23, 7, 444, 32&lt;/P&gt;&lt;P&gt;43, 55, 5, 6445&lt;/P&gt;&lt;P&gt;12, 435, 43534, 4&lt;/P&gt;&lt;P&gt;122, 2, 444, 35&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2017 07:16:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Quantity-work-conditions-in-SQL-query/m-p/1348167#M617353</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-06-23T07:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Quantity work conditions in SQL query</title>
      <link>https://community.qlik.com/t5/QlikView/Quantity-work-conditions-in-SQL-query/m-p/1348168#M617355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;But it must be not scripting code from QV. I need SQL query.&lt;/P&gt;&lt;P&gt;Query must check each records and quantity conditions for each of them which are working.&lt;/P&gt;&lt;P&gt;If quantity of working conditions for some record =2, it must be shown in result table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2017 07:21:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Quantity-work-conditions-in-SQL-query/m-p/1348168#M617355</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-23T07:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Quantity work conditions in SQL query</title>
      <link>https://community.qlik.com/t5/QlikView/Quantity-work-conditions-in-SQL-query/m-p/1348169#M617356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please give proper name for your field then it will help us to give reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2017 07:27:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Quantity-work-conditions-in-SQL-query/m-p/1348169#M617356</guid>
      <dc:creator>prma7799</dc:creator>
      <dc:date>2017-06-23T07:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Quantity work conditions in SQL query</title>
      <link>https://community.qlik.com/t5/QlikView/Quantity-work-conditions-in-SQL-query/m-p/1348170#M617357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am sorry, We are in Qlik Forum. Move to DB Forum&lt;/P&gt;&lt;P&gt;FYI, This should work in SQL Engine &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;SELECT Field1, Field2, Field3, Field4 From TableName Where Field1 &amp;gt; Field2 and Field3 = 444 and Field4 &amp;gt; 32;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2017 07:28:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Quantity-work-conditions-in-SQL-query/m-p/1348170#M617357</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-06-23T07:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Quantity work conditions in SQL query</title>
      <link>https://community.qlik.com/t5/QlikView/Quantity-work-conditions-in-SQL-query/m-p/1348171#M617358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;/P&gt;
&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 256px;"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="xl65" height="20" style="border: 0px solid black;" width="64"&gt;Field1&lt;/TD&gt;
&lt;TD class="xl65" style="border: 0px solid black; border-left: none;" width="64"&gt;Field2&lt;/TD&gt;
&lt;TD class="xl65" style="border: 0px solid black; border-left: none;" width="64"&gt;Field3&lt;/TD&gt;
&lt;TD class="xl68" style="border: 0px solid black; border-left: none;" width="64"&gt;Field4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align="right" class="xl66" height="20" style="border: 0px solid black; border-top: none;"&gt;12&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border: 0px solid black; border-left: none; border-top: none;"&gt;12&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border: 0px solid black; border-left: none;"&gt;54&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align="right" class="xl66" height="20" style="border: 0px solid black; border-top: none;"&gt;23&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border: 0px solid black; border-left: none; border-top: none;"&gt;7&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border: 0px solid black; border-left: none; border-top: none;"&gt;444&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border: 0px solid black; border-left: none;"&gt;32&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;For this you can simply write &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select&amp;nbsp; Field1,Field2,Field3,Field4&lt;/P&gt;&lt;P&gt;from tablename&lt;/P&gt;&lt;P&gt;where &lt;SPAN style="font-size: 13.3333px;"&gt; Field1 in (12,23);&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border: 0px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2017 07:29:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Quantity-work-conditions-in-SQL-query/m-p/1348171#M617358</guid>
      <dc:creator>prma7799</dc:creator>
      <dc:date>2017-06-23T07:29:51Z</dc:date>
    </item>
  </channel>
</rss>

