<?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: Case Statement in SQL convert to QlikView in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Case-Statement-in-SQL-convert-to-QlikView/m-p/2478626#M1226040</link>
    <description>&lt;P&gt;Hi, A, B and C are differnt tables, you first have to make the relations to have all needed fields in the same table. Or use ApplyMap to retrieve the values from other tables.&lt;/P&gt;
&lt;P&gt;Once you have all in one table, you can just do it with If's, like:&lt;/P&gt;
&lt;P&gt;If(COLUMN1='T', 'TA'&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ,If(&lt;SPAN&gt;COLUMN2='C'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ,If(COLUMN3='C' and&amp;nbsp;COLUMN1&amp;lt;&amp;gt;'T', 'TR', 'TR1)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ,If(COLUMN4='C' and&amp;nbsp;COLUMN1&amp;lt;&amp;gt;'T', 'TR', 'TR1)))&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Aug 2024 08:28:12 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2024-08-29T08:28:12Z</dc:date>
    <item>
      <title>Case Statement in SQL convert to QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Case-Statement-in-SQL-convert-to-QlikView/m-p/2478582#M1226039</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I've the below case statement in SQL and I would like to convert it into QlikView.&lt;/P&gt;
&lt;P&gt;CASE WHEN A.COLUMN1='T' THEN 'TA' ELSE &lt;BR /&gt;CASE WHEN B.COLUMN2='C' THEN &lt;BR /&gt;CASE WHEN B.COLUMN3 = 'C' AND A.COLUMN1&amp;lt;&amp;gt;'T' THEN 'TR' ELSE 'TR1' END ELSE&lt;BR /&gt;CASE WHEN C.COLUMN4 = 'C' AND A.COLUMN1&amp;lt;&amp;gt;'T' THEN 'TR' ELSE 'TR1' END END END AS NewColumn&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 04:26:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-Statement-in-SQL-convert-to-QlikView/m-p/2478582#M1226039</guid>
      <dc:creator>vikasshana</dc:creator>
      <dc:date>2024-08-29T04:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Case Statement in SQL convert to QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Case-Statement-in-SQL-convert-to-QlikView/m-p/2478626#M1226040</link>
      <description>&lt;P&gt;Hi, A, B and C are differnt tables, you first have to make the relations to have all needed fields in the same table. Or use ApplyMap to retrieve the values from other tables.&lt;/P&gt;
&lt;P&gt;Once you have all in one table, you can just do it with If's, like:&lt;/P&gt;
&lt;P&gt;If(COLUMN1='T', 'TA'&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ,If(&lt;SPAN&gt;COLUMN2='C'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ,If(COLUMN3='C' and&amp;nbsp;COLUMN1&amp;lt;&amp;gt;'T', 'TR', 'TR1)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ,If(COLUMN4='C' and&amp;nbsp;COLUMN1&amp;lt;&amp;gt;'T', 'TR', 'TR1)))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 08:28:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-Statement-in-SQL-convert-to-QlikView/m-p/2478626#M1226040</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2024-08-29T08:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Case Statement in SQL convert to QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Case-Statement-in-SQL-convert-to-QlikView/m-p/2479050#M1226046</link>
      <description>&lt;P&gt;see also &lt;BR /&gt;&lt;A href="https://help.qlik.com/en-US/sense/May2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ConditionalFunctions/if.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/May2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ConditionalFunctions/if.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Sep 2024 19:43:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-Statement-in-SQL-convert-to-QlikView/m-p/2479050#M1226046</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2024-09-01T19:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Case Statement in SQL convert to QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Case-Statement-in-SQL-convert-to-QlikView/m-p/2479106#M1226048</link>
      <description>&lt;P&gt;We can optimize it more as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If(COLUMN1='T', 'TA'&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ,If(&lt;SPAN&gt;COLUMN2='C'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ,If(COLUMN3='C' or COLUMN4='C', 'TR', 'TR1)&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Prashant Sangle&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 07:47:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-Statement-in-SQL-convert-to-QlikView/m-p/2479106#M1226048</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2024-09-02T07:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Case Statement in SQL convert to QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Case-Statement-in-SQL-convert-to-QlikView/m-p/2479107#M1226049</link>
      <description>&lt;P&gt;Indeed, just one addition:&lt;/P&gt;
&lt;P&gt;If(COLUMN1='T', 'TA'&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ,If(&lt;SPAN&gt;COLUMN2='C'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ,If((COLUMN3='C' or COLUMN4='C') and&amp;nbsp;COLUMN1&amp;lt;&amp;gt;'T', 'TR', 'TR1')&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 08:11:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-Statement-in-SQL-convert-to-QlikView/m-p/2479107#M1226049</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2024-09-02T08:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Case Statement in SQL convert to QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Case-Statement-in-SQL-convert-to-QlikView/m-p/2479112#M1226050</link>
      <description>&lt;P&gt;you don't need to add &lt;SPAN&gt;&lt;STRONG&gt;and&amp;nbsp;COLUMN1&amp;lt;&amp;gt;'T'&lt;/STRONG&gt; this condition in 3rd If statement, as we are already testing it in 1st if statement &amp;amp; if it is not validating that condition then only it will go into else part. so, it will automatically get validated.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 08:37:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-Statement-in-SQL-convert-to-QlikView/m-p/2479112#M1226050</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2024-09-02T08:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Case Statement in SQL convert to QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Case-Statement-in-SQL-convert-to-QlikView/m-p/2479121#M1226052</link>
      <description>&lt;P&gt;You are right again&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 09:55:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-Statement-in-SQL-convert-to-QlikView/m-p/2479121#M1226052</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2024-09-02T09:55:39Z</dc:date>
    </item>
  </channel>
</rss>

