<?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 proc SQL in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-SQL-in-SAS/m-p/430873#M106519</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I need to write sql code in sas,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;variable A divide to Variable b&amp;nbsp; * 100, if answer more then 5 then give me new variable filled "Y"&lt;/P&gt;&lt;P&gt;using data name Example&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jan 2018 12:26:58 GMT</pubDate>
    <dc:creator>Vahe_Mar</dc:creator>
    <dc:date>2018-01-25T12:26:58Z</dc:date>
    <item>
      <title>proc SQL in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-SQL-in-SAS/m-p/430873#M106519</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I need to write sql code in sas,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;variable A divide to Variable b&amp;nbsp; * 100, if answer more then 5 then give me new variable filled "Y"&lt;/P&gt;&lt;P&gt;using data name Example&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 12:26:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-SQL-in-SAS/m-p/430873#M106519</guid>
      <dc:creator>Vahe_Mar</dc:creator>
      <dc:date>2018-01-25T12:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: proc SQL in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-SQL-in-SAS/m-p/430874#M106520</link>
      <description>select case when (var_a / var_b)*100 &amp;gt; 5 then 'Y' else 'N' end as var_c&lt;BR /&gt;from table</description>
      <pubDate>Thu, 25 Jan 2018 12:31:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-SQL-in-SAS/m-p/430874#M106520</guid>
      <dc:creator>Rhys</dc:creator>
      <dc:date>2018-01-25T12:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: proc SQL in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-SQL-in-SAS/m-p/430875#M106521</link>
      <description>&lt;P&gt;Then "Y" can you tell me where is my variable which should be equal to "y"&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 12:35:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-SQL-in-SAS/m-p/430875#M106521</guid>
      <dc:creator>Vahe_Mar</dc:creator>
      <dc:date>2018-01-25T12:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: proc SQL in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-SQL-in-SAS/m-p/430877#M106522</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/121229"&gt;@Rhys&lt;/a&gt;&amp;nbsp;solution:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select case when (var_a / var_b)*100 &amp;gt; 5 then 'Y' else 'N' end as var_c&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;means that result (either Y or N) wil be in var_c variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 12:41:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-SQL-in-SAS/m-p/430877#M106522</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2018-01-25T12:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: proc SQL in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-SQL-in-SAS/m-p/430963#M106548</link>
      <description>&lt;P&gt;As a general note you might want to consider using numeric values of 1 and 0 instead of character 'Y' and 'N'.&lt;/P&gt;
&lt;P&gt;If 1 is the value for 'Y' or 'Yes' or however you think then:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If varname then &amp;lt;other code&amp;gt; ; treats a value for the variable varname as true.&lt;/P&gt;
&lt;P&gt;You can a have a number of different formats to assign a display value of 'Y', 'Yes' ,'True', 'In Compliance' or what have you.&lt;/P&gt;
&lt;P&gt;For summary tables such as in proc report or proc tabulate then the N statistics gives how many results are assigned either value, Sum shows number of 'Y' values and mean is percentage of 'Y' values.&lt;/P&gt;
&lt;P&gt;If you have multiple variables code this way then Sum of the variables gives a count of how many variables have 'Y' values.&lt;/P&gt;
&lt;P&gt;And other coding behaviors are possible that get more cumbersome for character values.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 15:43:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-SQL-in-SAS/m-p/430963#M106548</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-01-25T15:43:50Z</dc:date>
    </item>
  </channel>
</rss>

