<?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: SQL to Qlikview Case/Then/End in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124642#M634205</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You for your reply, however I am trying to avoid writing anything in SQL as I just don't understand it enough.&lt;/P&gt;&lt;P&gt;Is there no way to write the SQL in a Qlik syntax?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 May 2016 07:58:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-05-12T07:58:28Z</dc:date>
    <item>
      <title>SQL to Qlikview Case/Then/End</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124640#M634203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this should be quite simple but I am&amp;nbsp; a bit of a newb and think I would learn more being pointed in the right direction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below is part of an SQL script that I have inherited and am attempting to translate it to Qlikview, I have had a few goes but need a little more guidance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-GB; mso-fareast-language: EN-GB; mso-bidi-language: AR-SA;"&gt;left outer join (select order_no,line_no,rel_no,line_item_no, &lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="color: #000000; text-decoration: underline;"&gt; min(case when message_text = 'Reserved' then trunc(date_entered) end) reserved, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="color: #000000; text-decoration: underline;"&gt; min(case when message_text = 'Picked' then trunc(date_entered) end) picked, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="color: #000000; text-decoration: underline;"&gt; min(case when message_text = 'Delivered' then trunc(date_entered) end) delivered &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt; from ifsapp.customer_order_line_hist h &lt;BR /&gt; group by order_no,line_no,rel_no,line_item_no) dsplh2 &lt;BR /&gt; on dspl2.order_no = dsplh2.order_no &lt;BR /&gt; and dspl2.line_no = dsplh2.line_no &lt;BR /&gt; and dspl2.rel_no = dsplh2.rel_no &lt;BR /&gt; and dspl2.line_item_no = dsplh2.line_item_no &lt;BR /&gt; &lt;BR /&gt; Its mostly the parts underlined that I need help translating, I'm alright with the rest.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-GB; mso-fareast-language: EN-GB; mso-bidi-language: AR-SA;"&gt;Thank You&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 14:43:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124640#M634203</guid>
      <dc:creator />
      <dc:date>2016-05-11T14:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: SQL to Qlikview Case/Then/End</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124641#M634204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Graham&lt;/P&gt;&lt;P&gt;If you tick the preceding load checkbox when you select the database to connect to and choose the fields you require you will see something similar to this&lt;/P&gt;&lt;P&gt;LOAD field A,&lt;/P&gt;&lt;P&gt;Field B etc&lt;/P&gt;&lt;P&gt;SQL Select field A,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Case when Field B ='1' then do something else&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;from database&lt;/P&gt;&lt;P&gt;You will then be able to use your SQL case statement in the SQL select portion of your script as illustrated in the bold font above. If you have any problems just ask. Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 15:32:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124641#M634204</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-11T15:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: SQL to Qlikview Case/Then/End</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124642#M634205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You for your reply, however I am trying to avoid writing anything in SQL as I just don't understand it enough.&lt;/P&gt;&lt;P&gt;Is there no way to write the SQL in a Qlik syntax?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 07:58:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124642#M634205</guid>
      <dc:creator />
      <dc:date>2016-05-12T07:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: SQL to Qlikview Case/Then/End</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124643#M634206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Graham&lt;/P&gt;&lt;P&gt;Yes you could use nested if statements for example:&lt;/P&gt;&lt;P&gt;if (&lt;SPAN style="text-decoration: underline; font-family: Courier New;"&gt;min(case when message_text = 'Reserved',then whatever output you require,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline; font-family: Courier New;"&gt;&lt;SPAN style="text-decoration: underline; font-family: Courier New;"&gt;if(min(case when message_text = 'Picked' then output))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New;"&gt;Remember as you are using the min function you will need to use group by so it may be better to do this as either a preceding or resident load. Could you share an example of your script for clarity. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New;"&gt;Kindest Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New;"&gt;B&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2016 08:09:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124643#M634206</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-16T08:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: SQL to Qlikview Case/Then/End</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124644#M634207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you directly run this query from qlikview and store the data into the QVD? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2016 08:18:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124644#M634207</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-05-16T08:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: SQL to Qlikview Case/Then/End</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124645#M634208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try with simple if else statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;min(if(message_text='Reserved',floor(date_entered)) as reserved,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;min(if(message_text='Picked',floor(date_entered)) as Picked,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;min(if(message_text='Delivered',floor(date_entered)) as Delivered&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Regards,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2016 08:31:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124645#M634208</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2016-05-16T08:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: SQL to Qlikview Case/Then/End</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124646#M634209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You, however this doesn't appear to work, I think there is something slightly wrong with the syntax?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2016 09:26:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124646#M634209</guid>
      <dc:creator />
      <dc:date>2016-05-16T09:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: SQL to Qlikview Case/Then/End</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124647#M634210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Translating your above into what I think is correct my script looks like the below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Customer_Order_Line_Hist:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[ORDER_NO]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[LINE_NO]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[REL_NO]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[LINE_ITEM_NO]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;COLINEKEY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Floor&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DATE_ENTERED&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),'DD/MM/YYY') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DATE_ENTERED&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MESSAGE_TEXT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CUSTOMER_ORDER_LINE_HIST_MESSAGE_TEXT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;min&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;case&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; when message_text = 'Reserved' then floor(DATE_ENTERED)) as RESERVED,&lt;BR /&gt; if(min(case when message_text = 'Picked' then floor(DATE_ENTERED)) as PICKED,&lt;BR /&gt; if(min(case when message_text = 'Delivered' then floor(DATE_ENTERED)) as DELIVERED)))&lt;BR /&gt; &lt;BR /&gt; FROM&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vQVDPath)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;CUSTOMER_ORDER_LINE_HIST.qvd&lt;BR /&gt; (QVD)&lt;BR /&gt; Group by ORDER_NO &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;However he syntax is throwing a wobbled passed the first 'when'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thoughts?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2016 10:32:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124647#M634210</guid>
      <dc:creator />
      <dc:date>2016-05-16T10:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: SQL to Qlikview Case/Then/End</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124648#M634211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;These expressions should serve:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Min(If(message_text = 'Reserved', floor(date_entered)) as reserved,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Min(If(message_text = 'Picked', floor(date_entered)) as picked,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Min(If(message_text = 'Delivered', floor(date_entered)) as delivered,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember that the load will need a Group By clause for all the non-aggregated fields (ie not in a Min/Max/Sum/Count/etc function).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2016 10:53:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124648#M634211</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-05-16T10:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: SQL to Qlikview Case/Then/End</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124649#M634212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Thank You, however this doesn't appear to work, I think there is something slightly wrong with the syntax?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you include Group By clause?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2016 10:54:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124649#M634212</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-05-16T10:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: SQL to Qlikview Case/Then/End</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124650#M634213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I did, taking the above, I'm still not getting any further than the first 'if',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;Customer_Order_Line_Hist:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[ORDER_NO]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[LINE_NO]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[REL_NO]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[LINE_ITEM_NO]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;COLINEKEY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ORDER_NO&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DATE_ENTERED&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MESSAGE_TEXT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Min&lt;/SPAN&gt;&lt;STRONG style=": ; color: #ff0000; font-size: 8pt;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MESSAGE_TEXT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 'Reserved', &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;floor&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DATE_ENTERED&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;reserved&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;BR /&gt; Min&lt;/SPAN&gt;&lt;STRONG style=": ; color: #ff0000; font-size: 8pt;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;If(MESSAGE_TEXT = 'Picked', floor(DATE_ENTERED)) as picked,&lt;BR /&gt; &lt;BR /&gt; Min&lt;/SPAN&gt;&lt;STRONG style=": ; color: #ff0000; font-size: 8pt;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;If(MESSAGE_TEXT = 'Delivered', floor(DATE_ENTERED)) as delivered,&lt;BR /&gt; &lt;BR /&gt; FROM&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vQVDPath)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;CUSTOMER_ORDER_LINE_HIST.qvd&lt;BR /&gt; (QVD)&lt;BR /&gt; Group by ORDER_NO; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2016 11:02:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124650#M634213</guid>
      <dc:creator />
      <dc:date>2016-05-16T11:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: SQL to Qlikview Case/Then/End</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124651#M634214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Min(If(Wildmatch(message_text, '*Reserved*')&amp;gt;0, Floor(date_entered))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS [Reserved Date],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Min(If(Wildmatch(message_text,'*Picked*')&amp;gt;0, Floor(date_entered))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS [Picked Date],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Min(If(Wildmatch(message_text,'*Delivered*')&amp;gt;0, Floor(date_entered))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS [Delivered Date]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will have to use Group By &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2016 11:27:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124651#M634214</guid>
      <dc:creator>Gabriel</dc:creator>
      <dc:date>2016-05-16T11:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: SQL to Qlikview Case/Then/End</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124652#M634215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Graham,&lt;/P&gt;&lt;P&gt;It seems your data source is Oracle EBS, if so, try to know what they want using the SQL, you can take any of the SQL developers help , because you can handle all those things in the front end other wise it is a night mare doing all those left join stuff with Oracle functions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2016 11:57:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124652#M634215</guid>
      <dc:creator>kkkumar82</dc:creator>
      <dc:date>2016-05-16T11:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: SQL to Qlikview Case/Then/End</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124653#M634216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Graham&lt;/P&gt;&lt;P&gt;Try amending the group by as below to include all the columns in your select statement:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Group by [ORDER_NO]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[LINE_NO]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[REL_NO]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[LINE_ITEM_NO]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ORDER_NO&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DATE_ENTERED&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MESSAGE_TEXT;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2016 16:41:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124653#M634216</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-16T16:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: SQL to Qlikview Case/Then/End</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124654#M634217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is one closing bracket missing&lt;/P&gt;&lt;P&gt;add it at end of date_entered and try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;min(if(message_text='Reserved',floor(date_entered))&lt;STRONG&gt;)&lt;/STRONG&gt; as reserved,&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;min(if(message_text='Picked',floor(date_entered))&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;)&lt;/STRONG&gt; as Picked,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;min(if(message_text='Delivered',floor(date_entered))&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;)&lt;/STRONG&gt; as Delivered&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 05:01:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124654#M634217</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2016-05-17T05:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: SQL to Qlikview Case/Then/End</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124655#M634218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Every field not inside an aggregation function needs to be listed in the group by clause:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Customer_Order_Line_Hist:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ORDER_NO]&amp;amp;[LINE_NO]&amp;amp;[REL_NO]&amp;amp;[LINE_ITEM_NO] as COLINEKEY,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ORDER_NO, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE_ENTERED,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MESSAGE_TEXT,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Min(If(MESSAGE_TEXT = 'Reserved', floor(DATE_ENTERED))) as reserved,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Min(If(MESSAGE_TEXT = 'Picked', floor(DATE_ENTERED))) as picked,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Min(If(MESSAGE_TEXT = 'Delivered', floor(DATE_ENTERED))) as delivered,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM $(vQVDPath)CUSTOMER_ORDER_LINE_HIST.qvd (QVD)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Group by [ORDER_NO],&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; [LINE_NO],&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; [REL_NO],&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; [LINE_ITEM_NO],&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; MESSAGE_TEXT;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 05:11:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Case-Then-End/m-p/1124655#M634218</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-05-17T05:11:31Z</dc:date>
    </item>
  </channel>
</rss>

