<?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: Can we use if and else if inside proc sql? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Can-we-use-if-and-else-if-inside-proc-sql/m-p/751398#M236537</link>
    <description>&lt;P&gt;No problem. Best of luck on your SAS journey!&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jul 2021 04:38:34 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2021-07-01T04:38:34Z</dc:date>
    <item>
      <title>Can we use if and else if inside proc sql?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-use-if-and-else-if-inside-proc-sql/m-p/751392#M236532</link>
      <description>&lt;P&gt;Proc sql;&lt;/P&gt;
&lt;P&gt;create table mytable as&lt;/P&gt;
&lt;P&gt;select distinct b.*,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if b.rate &amp;lt; 35 then '50th'&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; else if &amp;lt; 50 then '75th'&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if &amp;lt; 75 then '80th'&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if &amp;gt;=75 'this is the one' as label = 'done'&lt;/P&gt;
&lt;P&gt;, a.diagcode&lt;/P&gt;
&lt;P&gt;from tableb b left join tablea a on....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or if statement can't be used inside proc sql and we need to use case statement only?&lt;/P&gt;
&lt;P&gt;Respectfully,&lt;/P&gt;
&lt;P&gt;blue blue&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 03:23:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-use-if-and-else-if-inside-proc-sql/m-p/751392#M236532</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-07-01T03:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use if and else if inside proc sql?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-use-if-and-else-if-inside-proc-sql/m-p/751393#M236533</link>
      <description>&lt;P&gt;I'm pretty sure we gave you the answer to this in another of your questions. There is no such thing as IF logic in SQL only CASE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've followed your progress on the Community with interest and respectfully I think you are missing some basic SAS concepts that would really speed up your learning.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you start using the free SAS online learning resources like this huge list of &lt;A href="https://video.sas.com/#category/videos/how-to-tutorials" target="_blank" rel="noopener"&gt;how-to tutorials&lt;/A&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And explore the &lt;A href="https://documentation.sas.com/doc/en/helpcenterwlcm/1.0/home.htm" target="_blank" rel="noopener"&gt;SAS documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These will really supercharge your learning!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 03:43:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-use-if-and-else-if-inside-proc-sql/m-p/751393#M236533</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-07-01T03:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use if and else if inside proc sql?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-use-if-and-else-if-inside-proc-sql/m-p/751395#M236535</link>
      <description>&lt;P&gt;I am so grateful to your response.&lt;/P&gt;
&lt;P&gt;I have a couple of certificates in SAS. I am doing SAS Base currently, and I get any chance, I will listen to my tutorials again. I wish I had not gone for it at all!&lt;/P&gt;
&lt;P&gt;I am currently covering The little SAS Book.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will go to the links you sent me, thank you very much. Unfortunately topics that I post here requires answers for my project that are due. SAS documentation is very technical and it is very hard to understand, at least for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I probably asked you this question before, but what happens is if I don't use them, I will lose them. The way you mentioned to me here, believe me, I wont' forget it.&lt;/P&gt;
&lt;P&gt;Thanks for your advice and link you sent me.&lt;/P&gt;
&lt;P&gt;Blue Blue&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 04:08:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-use-if-and-else-if-inside-proc-sql/m-p/751395#M236535</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-07-01T04:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use if and else if inside proc sql?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-use-if-and-else-if-inside-proc-sql/m-p/751398#M236537</link>
      <description>&lt;P&gt;No problem. Best of luck on your SAS journey!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 04:38:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-use-if-and-else-if-inside-proc-sql/m-p/751398#M236537</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-07-01T04:38:34Z</dc:date>
    </item>
  </channel>
</rss>

