<?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: Enterprise Guide Help with Functions in a Query Builder in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Enterprise-Guide-Help-with-Functions-in-a-Query-Builder/m-p/109558#M292157</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another option to bear in mind for true/false conditions is the use of a function instead of case statements.&lt;/P&gt;&lt;P&gt;In this instance the sign() function would provide the result you require and is more efficient and less work than the case solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Aug 2013 00:53:50 GMT</pubDate>
    <dc:creator>RichardinOz</dc:creator>
    <dc:date>2013-08-15T00:53:50Z</dc:date>
    <item>
      <title>Enterprise Guide Help with Functions in a Query Builder</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enterprise-Guide-Help-with-Functions-in-a-Query-Builder/m-p/109553#M292152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to add a new column to a data set that would sort of be an if - then statement in excel how I know it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a propensity column that calculates the propensity of certain diseases among age and gender groups. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want is to add a new column that returns a 1 if the propensity is greater than 0, and returns a 0 if propensity is 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw A LOT of functions in the query builder "New Computed Column" --&amp;gt; "Advanced Expression" field. But I am not sure if that is it, I was originally thinking I would need to do a re coded column, but again I do not know for sure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Aug 2013 15:49:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enterprise-Guide-Help-with-Functions-in-a-Query-Builder/m-p/109553#M292152</guid>
      <dc:creator>dude12345</dc:creator>
      <dc:date>2013-08-13T15:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Help with Functions in a Query Builder</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enterprise-Guide-Help-with-Functions-in-a-Query-Builder/m-p/109554#M292153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are definitely on the right track.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In EG 4.2 &lt;A href="http://support.sas.com/kb/38/261.html"&gt;http://support.sas.com/kb/38/261.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In EG 4.1 &lt;A href="http://support.sas.com/kb/32/160.html"&gt;http://support.sas.com/kb/32/160.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Aug 2013 20:24:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enterprise-Guide-Help-with-Functions-in-a-Query-Builder/m-p/109554#M292153</guid>
      <dc:creator>Fugue</dc:creator>
      <dc:date>2013-08-13T20:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Help with Functions in a Query Builder</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enterprise-Guide-Help-with-Functions-in-a-Query-Builder/m-p/109555#M292154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is more than one way.&lt;/P&gt;&lt;P&gt;A Case statement would also work in advanced expression. Its more like an if-then statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case when propensity&amp;gt;0 then 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when propensity=0 then 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else -1&lt;/P&gt;&lt;P&gt;END&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember to rename and re-alias the column in the dialog.&lt;/P&gt;&lt;P&gt;Here's a SQL reference to CASE statement. &lt;/P&gt;&lt;P&gt;&lt;A href="http://technet.microsoft.com/en-us/library/ms181765.aspx" title="http://technet.microsoft.com/en-us/library/ms181765.aspx"&gt;CASE (Transact-SQL)&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Aug 2013 20:34:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enterprise-Guide-Help-with-Functions-in-a-Query-Builder/m-p/109555#M292154</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-08-13T20:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Help with Functions in a Query Builder</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enterprise-Guide-Help-with-Functions-in-a-Query-Builder/m-p/109556#M292155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;True true, the Case statement sitll works via "advanced expression". For some reason, SAS is promoting "if-then-else" logic via the "recode column" function. Both the "advanced expression" and the "recode column" features result in a CASE expression (when used for if-then-else logic).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Aug 2013 20:48:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enterprise-Guide-Help-with-Functions-in-a-Query-Builder/m-p/109556#M292155</guid>
      <dc:creator>Fugue</dc:creator>
      <dc:date>2013-08-13T20:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Help with Functions in a Query Builder</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enterprise-Guide-Help-with-Functions-in-a-Query-Builder/m-p/109557#M292156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone! I am not at work anymore (and thus do not have access to our virtual machine running SAS)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try these out tomorrow.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Aug 2013 21:09:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enterprise-Guide-Help-with-Functions-in-a-Query-Builder/m-p/109557#M292156</guid>
      <dc:creator>dude12345</dc:creator>
      <dc:date>2013-08-13T21:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Help with Functions in a Query Builder</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enterprise-Guide-Help-with-Functions-in-a-Query-Builder/m-p/109558#M292157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another option to bear in mind for true/false conditions is the use of a function instead of case statements.&lt;/P&gt;&lt;P&gt;In this instance the sign() function would provide the result you require and is more efficient and less work than the case solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Aug 2013 00:53:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enterprise-Guide-Help-with-Functions-in-a-Query-Builder/m-p/109558#M292157</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2013-08-15T00:53:50Z</dc:date>
    </item>
  </channel>
</rss>

