<?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: problems with one CASE into one select in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/problems-with-one-CASE-into-one-select/m-p/415880#M697170</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The SELECT statement is evaluated by the database, not by QlikView. If you want to make the SELECT work, you need to check the documentation of your database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise you can put the same logic in an if-function in a preceding Load. See more on &lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/03/04/preceding-load" title="http://community.qlik.com/blogs/qlikviewdesignblog/2013/03/04/preceding-load"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/03/04/preceding-load&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Mar 2013 08:54:46 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2013-03-08T08:54:46Z</dc:date>
    <item>
      <title>problems with one CASE into one select</title>
      <link>https://community.qlik.com/t5/QlikView/problems-with-one-CASE-into-one-select/m-p/415878#M697168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community! I need help with the following situation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following table stores the errors in a production process:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="72" style="width: 132px; height: 74px; border: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;stops&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;id_stop&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;error_description&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;start_time&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;end_time&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;duration&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is, I need to identify how many errors occur per shift, but shifts currently we not stored anywhere.&lt;/P&gt;&lt;P&gt;the information its should be, for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="114" style="width: 248px; height: 93px; border: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;shift&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;shif_group&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2013-01-01&lt;/TD&gt;&lt;TD&gt;morning&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2013-01-01&lt;/TD&gt;&lt;TD&gt;evening&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2013-01-01&lt;/TD&gt;&lt;TD&gt;night&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2013-01-02&lt;/TD&gt;&lt;TD&gt;night&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Morning shifts are from 6 am to 14 pm.&lt;BR /&gt;the evening from 14 PM to 22 PM.&lt;BR /&gt;the night from 22 PM to 6 PM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;select &lt;SPAN style="font-size: 8pt;"&gt; id_stop, error_description, start_time, end_time, duration,&lt;BR /&gt;shift= CASE &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when DatePart(hh, start_time) between 22 and 23 then 'Night'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when DatePart(hh, start_time) between 00 and 05 then 'Night'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when DatePart(hh, start_time) between 06 and 13 then 'Morning'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when DatePart(hh, start_time) between 14 and 21 then 'Evening'&lt;BR /&gt;end &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;&lt;SPAN style="font-size: 8pt;"&gt;from stops&lt;BR /&gt;where start_time &amp;gt;= '2013-01-01' &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&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;&lt;/P&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;But I have an error, "the column shift does not exist".&lt;/P&gt;&lt;P&gt;Can anyone help me out in this problem? or perhaps with a better idea how solved this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from already thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 08:12:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problems-with-one-CASE-into-one-select/m-p/415878#M697168</guid>
      <dc:creator />
      <dc:date>2013-03-07T08:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: problems with one CASE into one select</title>
      <link>https://community.qlik.com/t5/QlikView/problems-with-one-CASE-into-one-select/m-p/415879#M697169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out IntervalMatch funtion in qlikview help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 08:20:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problems-with-one-CASE-into-one-select/m-p/415879#M697169</guid>
      <dc:creator>sushil353</dc:creator>
      <dc:date>2013-03-07T08:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: problems with one CASE into one select</title>
      <link>https://community.qlik.com/t5/QlikView/problems-with-one-CASE-into-one-select/m-p/415880#M697170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The SELECT statement is evaluated by the database, not by QlikView. If you want to make the SELECT work, you need to check the documentation of your database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise you can put the same logic in an if-function in a preceding Load. See more on &lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/03/04/preceding-load" title="http://community.qlik.com/blogs/qlikviewdesignblog/2013/03/04/preceding-load"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/03/04/preceding-load&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Mar 2013 08:54:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problems-with-one-CASE-into-one-select/m-p/415880#M697170</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-03-08T08:54:46Z</dc:date>
    </item>
  </channel>
</rss>

