<?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 Using IF statements in Query Builder in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Using-IF-statements-in-Query-Builder/m-p/181275#M1243</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The query builder allows the creation of custom expressions that use basic arithmetic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, it seems that it is impossible to use any sort of Boolean Logic statements (VA 6.4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is really, really annoying and value and purpose of the Query Building feature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise whether this has been resolved in later versions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Jan 2015 23:00:20 GMT</pubDate>
    <dc:creator>JimLittle</dc:creator>
    <dc:date>2015-01-13T23:00:20Z</dc:date>
    <item>
      <title>Using IF statements in Query Builder</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Using-IF-statements-in-Query-Builder/m-p/181275#M1243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The query builder allows the creation of custom expressions that use basic arithmetic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, it seems that it is impossible to use any sort of Boolean Logic statements (VA 6.4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is really, really annoying and value and purpose of the Query Building feature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise whether this has been resolved in later versions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 23:00:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Using-IF-statements-in-Query-Builder/m-p/181275#M1243</guid>
      <dc:creator>JimLittle</dc:creator>
      <dc:date>2015-01-13T23:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using IF statements in Query Builder</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Using-IF-statements-in-Query-Builder/m-p/181276#M1244</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;Sorry to hear of your frustrations. The SAS Visual Analytics Query Builder generates SQL code and as such if statements are not supported with this ANSI standard. If you are wanting to do Boolean logic, have a look at the CASE statement that can be used in a column expression, &lt;A href="http://support.sas.com/documentation/cdl/en/vaug/67270/HTML/default/viewer.htm#n0bk4cm9klgbh3n1jxpb8lfxu12p.htm" title="http://support.sas.com/documentation/cdl/en/vaug/67270/HTML/default/viewer.htm#n0bk4cm9klgbh3n1jxpb8lfxu12p.htm"&gt;http://support.sas.com/documentation/cdl/en/vaug/67270/HTML/default/viewer.htm#n0bk4cm9klgbh3n1jxpb8lfxu12p.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Michelle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 07:15:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Using-IF-statements-in-Query-Builder/m-p/181276#M1244</guid>
      <dc:creator>MichelleHomes</dc:creator>
      <dc:date>2015-01-14T07:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using IF statements in Query Builder</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Using-IF-statements-in-Query-Builder/m-p/181277#M1245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michelle,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, a CASE statement would work well. However, I cannot find any example of how to use the statement in any of the documentation for VA, and the link that you send through does not help (aside from "&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Enter arithmetic operators and expressions such as CASE statements directly in the &lt;/SPAN&gt;&lt;SPAN class="xis-windowItem" style="font-size: 10pt; line-height: 1.5em; font-weight: bold;"&gt;SQL expression&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; area").&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But please explain why the functionality within the Query tool in terms of expression building screens is so deficient???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VA is promoted as a tool that requires no knowledge of SQL, and while the expression builders within VA Explorer/Reporter are great - the functionality of the Query tool is woefully deficient.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The documentation I could find on the CASE syntax was here: &lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473682.htm" title="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473682.htm"&gt;http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473682.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I could not find anything related to CASE and VA specifcally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 20:09:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Using-IF-statements-in-Query-Builder/m-p/181277#M1245</guid>
      <dc:creator>JimLittle</dc:creator>
      <dc:date>2015-01-14T20:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using IF statements in Query Builder</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Using-IF-statements-in-Query-Builder/m-p/181278#M1246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Hi James, thank you for your feedback and sorry to hear of your frustration. We agree it makes sense to add additional functions and UI for this kind of logic. In the meantime CASE and other expressions from the doc or copied from your exploration or report expressions can be typed or pasted into the Data Builder expression area. A simple example is shown in the screenshot below. We will also pass along your feedback to our documentation team.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&lt;IMG alt="case_statement.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/8739_case_statement.png" width="450" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Thanks again,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;I-Kong&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 15:23:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Using-IF-statements-in-Query-Builder/m-p/181278#M1246</guid>
      <dc:creator>I_Kong_SAS</dc:creator>
      <dc:date>2015-01-16T15:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using IF statements in Query Builder</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Using-IF-statements-in-Query-Builder/m-p/181279#M1247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for that I-Kong,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have had some success with it now - which has been handy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have discovered some bad performance issues if you try to create calculated items on 165million rows of data, so I had to do some of the initial logic in Query Builder to filter out the data and perform the basic logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for passing this do the documentation team, the Query builder is definately not well covered compared to Explorer and Reporter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Jan 2015 20:30:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Using-IF-statements-in-Query-Builder/m-p/181279#M1247</guid>
      <dc:creator>JimLittle</dc:creator>
      <dc:date>2015-01-18T20:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using IF statements in Query Builder</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Using-IF-statements-in-Query-Builder/m-p/318946#M6013</link>
      <description>&lt;P&gt;What if the lookups is too big and changable , then i cant make it constant condition,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example the CASEMGMT.REF_TABLE_VALUE contains parents and childs lookups like attached image , then how to select the description automatically ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/6372iB654E5ABC6C22FE5/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="value desc.png" title="value desc.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's hard to code it to case X_RT_ECONOMIC_CD ="4_203" then 'some text description here'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can i write innser select inside VA expression like below :&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;define X_KYC_ECONOMIC_CODE='2_0';&lt;BR /&gt;select VALUE_DESC from CASEMGMT.REF_TABLE_VALUE where REF_TABLE_NM='X_RT_ECONOMIC_CD1' AND VALUE_CD='&amp;amp;X_KYC_ECONOMIC_CODE';&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 15:01:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Using-IF-statements-in-Query-Builder/m-p/318946#M6013</guid>
      <dc:creator>bagalaty</dc:creator>
      <dc:date>2016-12-14T15:01:27Z</dc:date>
    </item>
  </channel>
</rss>

