<?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 If SQL then QVD in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-SQL-then-QVD/m-p/343017#M1174741</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use wildmatch&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(wildmatch(NAMECUST,'NEW EXPRESS*'),'NEW EXPRESS')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 May 2012 17:35:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-15T17:35:14Z</dc:date>
    <item>
      <title>If SQL then QVD</title>
      <link>https://community.qlik.com/t5/QlikView/If-SQL-then-QVD/m-p/343012#M1174736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Qlikers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help needed for the following code plz plz plz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if "Yellow" in {vOESHDT.NAMECUST} then "Colorful"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else if ("SNOOZE" in {vOESHDT.NAMECUST} or "CAPTAIN" in {vOESHDT.NAMECUST}) then "Snooze"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-AU" style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;else {vOESHDT.NAMECUST} Others&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-AU" style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-AU" style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;Many Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-AU" style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;Aamir !&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 05:16:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-SQL-then-QVD/m-p/343012#M1174736</guid>
      <dc:creator />
      <dc:date>2012-05-09T05:16:14Z</dc:date>
    </item>
    <item>
      <title>If SQL then QVD</title>
      <link>https://community.qlik.com/t5/QlikView/If-SQL-then-QVD/m-p/343013#M1174737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure what you're asking here.&amp;nbsp; If you want that if statement into SQL, then you should use a case statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; When vOESHDT.NAMECUST like '%Yellow%' Then 'Colorful'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; When vOESHDT.NAMECUST like '%SNOOZE%' or vOESHDT.NAMECUST like '%CAPTAIN%' Then 'Snooze'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else 'Others'&lt;/P&gt;&lt;P&gt;End&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want that in Qlikview then you can use the If() function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(NameCust='Yellow','Colorful,If(NameCust='SNOOZE' or NameCust='CAPTAIN','Snooze','Others'))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 18:27:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-SQL-then-QVD/m-p/343013#M1174737</guid>
      <dc:creator />
      <dc:date>2012-05-09T18:27:10Z</dc:date>
    </item>
    <item>
      <title>If SQL then QVD</title>
      <link>https://community.qlik.com/t5/QlikView/If-SQL-then-QVD/m-p/343014#M1174738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;//I tried this code as i have had no background of qlikview or sql still learning nuh cant get right yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (NAMECUST='ALDI','ALDI',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;if (NAMECUST= 'YELLOW' or NAMECUST='PALE YELLOW','YELLOW',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;if (NAMECUST='HOLYCANE'or NAMECUST='HOLY CANE','HOLY CANE',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;if (NAMECUST='BELLS','BELLS',&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;if (NAMECUST='ASIAN' or NAMECUST='HARRIS',' ASIAN HARRIS',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (NAMECUST='BENCHMARKS','BENCHMARKS',&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;if (NAMECUST='FORTY BILLS', 'FORTY BILLS',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;if (NAMECUST='NEW EXPRESS', 'NEW EXPRESS','OTHERS')))))))) AS CUSTOMERS;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//It returns only "Others" value while i wanted to group all other values&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2012 05:09:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-SQL-then-QVD/m-p/343014#M1174738</guid>
      <dc:creator />
      <dc:date>2012-05-10T05:09:55Z</dc:date>
    </item>
    <item>
      <title>If SQL then QVD</title>
      <link>https://community.qlik.com/t5/QlikView/If-SQL-then-QVD/m-p/343015#M1174739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are the all the results of your field NAMECUST in capitol letters? Qlikview is case sensitive so that for example&lt;/P&gt;&lt;P&gt;Aldi is not equal to ALDI. You can use the function "lower()" to change these to lower characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (lower(NAMECUST)='aldi','ALDI',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (lower(NAMECUST)= 'yellow' or lower(NAMECUST)='pale yellow','YELLOW',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (lower(NAMECUST)='holycane'or lower(NAMECUST)='holy cane','HOLY CANE',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (lower(NAMECUST)='bells','BELLS',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (lower(NAMECUST)='asian' or lower(NAMECUST)='harris',' ASIAN HARRIS',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (lower(NAMECUST)='benchmarks','BENCHMARKS',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (lower(NAMECUST)='forty bills', 'FORTY BILLS',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (lower(NAMECUST)='new express', 'NEW EXPRESS','OTHERS')))))))) AS CUSTOMERS;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2012 12:59:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-SQL-then-QVD/m-p/343015#M1174739</guid>
      <dc:creator />
      <dc:date>2012-05-10T12:59:47Z</dc:date>
    </item>
    <item>
      <title>If SQL then QVD</title>
      <link>https://community.qlik.com/t5/QlikView/If-SQL-then-QVD/m-p/343016#M1174740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for your help Marcs&lt;/P&gt;&lt;P&gt; I was committing mistake because the names are more longer (e.g NAMECUST='NEWEXRESS(TOWN)') If i do in that way there will loads of names i have to define in if statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (NAMECUST='NEW EXPRESS(town1)','NEWEXPRESS')&lt;/P&gt;&lt;P&gt;if (NAMECUST='NEW EXPRESS(town2)','NEWEXPRESS'))&lt;/P&gt;&lt;P&gt; AS CUSTOMERS;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible that I might search by first name only instead of defining all customers in If statement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 May 2012 23:34:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-SQL-then-QVD/m-p/343016#M1174740</guid>
      <dc:creator />
      <dc:date>2012-05-13T23:34:59Z</dc:date>
    </item>
    <item>
      <title>If SQL then QVD</title>
      <link>https://community.qlik.com/t5/QlikView/If-SQL-then-QVD/m-p/343017#M1174741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use wildmatch&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(wildmatch(NAMECUST,'NEW EXPRESS*'),'NEW EXPRESS')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 17:35:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-SQL-then-QVD/m-p/343017#M1174741</guid>
      <dc:creator />
      <dc:date>2012-05-15T17:35:14Z</dc:date>
    </item>
    <item>
      <title>If SQL then QVD</title>
      <link>https://community.qlik.com/t5/QlikView/If-SQL-then-QVD/m-p/343018#M1174742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thank you so much for your help Marcs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Aamir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 01:29:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-SQL-then-QVD/m-p/343018#M1174742</guid>
      <dc:creator />
      <dc:date>2012-05-18T01:29:17Z</dc:date>
    </item>
  </channel>
</rss>

