<?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: Create new variable in SQL in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752715#M29787</link>
    <description>&lt;P&gt;FYI - I've updated your subject line to be more reflective of your question and moved your code to a code block to help with legibility. Please ensure you include a descriptive relevant subject line besides HELP in your posts. And not ALL CAPS unless you're a yeller. And most importantly - if you get an error message include the error message and log in your post as well as the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your CASE statement was not correct syntax wise.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;No assignment variable (RN_BAND=) should be included&lt;/LI&gt;
&lt;LI&gt;Missing END AS variableName portion&lt;/LI&gt;
&lt;LI&gt;Extra semicolons&lt;/LI&gt;
&lt;LI&gt;Higher is not a valid comparison operator, use GT or &amp;gt;&lt;/LI&gt;
&lt;LI&gt;FROM comes after the SELECT/CASE&lt;/LI&gt;
&lt;LI&gt;Refer to * for all variables, not sure what HOME.RN_BAND is referring to but it's not your calculated variable so that can all be removed.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select *, 
case when RN_score between 0 and 200 then  '0-200'
when RN_score between 201 and 4000 then  '201-400'
when RN_score between 401 and 600 then  '401-600'
when RN_score GT 600 then  '600+'
else 'errors' end as RN_BAND
from home.loans_data3
;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;See the documentation for examples.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/sqlproc/n0a85s0ijz65irn1h3jtariooea5.htm" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/sqlproc/n0a85s0ijz65irn1h3jtariooea5.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/388722"&gt;@nhev&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;DIV&gt;
&lt;OL&gt;
&lt;LI&gt;create an RN_band variable for the following groups of RN_score in SQL using the case when statement:
&lt;OL&gt;
&lt;LI&gt;0-200&lt;/LI&gt;
&lt;LI&gt;201-400&lt;/LI&gt;
&lt;LI&gt;401-600&lt;/LI&gt;
&lt;LI&gt;600+&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;FONT&gt;MY ANSWER BUT GETTING ERRORS CODES ANYONE?&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select home.RN_band* as
from home.loans_data3

case when RN_score between 0 and 200 then RN_band = '0-200';
when RN_score between 201 and 4000 then RN_band = '201-400';
when RN_score between 401 and 600 then RN_band = '401-600';
when RN_score higher 600 then RN_band = '600+';
when RN_band='errors';
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jul 2021 21:11:14 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-07-07T21:11:14Z</dc:date>
    <item>
      <title>Create new variable in SQL</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752712#M29785</link>
      <description>&lt;DIV&gt;
&lt;OL&gt;
&lt;LI&gt;create an RN_band variable for the following groups of RN_score in SQL using the case when statement:
&lt;OL&gt;
&lt;LI&gt;0-200&lt;/LI&gt;
&lt;LI&gt;201-400&lt;/LI&gt;
&lt;LI&gt;401-600&lt;/LI&gt;
&lt;LI&gt;600+&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;FONT&gt;MY ANSWER BUT GETTING ERRORS CODES ANYONE?&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select home.RN_band* as
from home.loans_data3

case when RN_score between 0 and 200 then RN_band = '0-200';
when RN_score between 201 and 4000 then RN_band = '201-400';
when RN_score between 401 and 600 then RN_band = '401-600';
when RN_score higher 600 then RN_band = '600+';
when RN_band='errors';
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 07 Jul 2021 20:43:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752712#M29785</guid>
      <dc:creator>nhev</dc:creator>
      <dc:date>2021-07-07T20:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: HELP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752713#M29786</link>
      <description>&lt;P&gt;You have used data step IF/THEN code in PROC SQL, which will not work. You want to use the PROC SQL syntax:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
    select home.RN_band* as
    from home.loans_data3
    case when RN_score between 0 and 200 then '0-200'
       when RN_score between 201 and 4000 then '201-400'
      when RN_score between 401 and 600 then '401-600'
      when RN_score &amp;gt;= 600 then '601+'
      else 'errors' end as rn_band;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 20:51:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752713#M29786</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-07T20:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Create new variable in SQL</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752715#M29787</link>
      <description>&lt;P&gt;FYI - I've updated your subject line to be more reflective of your question and moved your code to a code block to help with legibility. Please ensure you include a descriptive relevant subject line besides HELP in your posts. And not ALL CAPS unless you're a yeller. And most importantly - if you get an error message include the error message and log in your post as well as the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your CASE statement was not correct syntax wise.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;No assignment variable (RN_BAND=) should be included&lt;/LI&gt;
&lt;LI&gt;Missing END AS variableName portion&lt;/LI&gt;
&lt;LI&gt;Extra semicolons&lt;/LI&gt;
&lt;LI&gt;Higher is not a valid comparison operator, use GT or &amp;gt;&lt;/LI&gt;
&lt;LI&gt;FROM comes after the SELECT/CASE&lt;/LI&gt;
&lt;LI&gt;Refer to * for all variables, not sure what HOME.RN_BAND is referring to but it's not your calculated variable so that can all be removed.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select *, 
case when RN_score between 0 and 200 then  '0-200'
when RN_score between 201 and 4000 then  '201-400'
when RN_score between 401 and 600 then  '401-600'
when RN_score GT 600 then  '600+'
else 'errors' end as RN_BAND
from home.loans_data3
;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;See the documentation for examples.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/sqlproc/n0a85s0ijz65irn1h3jtariooea5.htm" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/sqlproc/n0a85s0ijz65irn1h3jtariooea5.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/388722"&gt;@nhev&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;DIV&gt;
&lt;OL&gt;
&lt;LI&gt;create an RN_band variable for the following groups of RN_score in SQL using the case when statement:
&lt;OL&gt;
&lt;LI&gt;0-200&lt;/LI&gt;
&lt;LI&gt;201-400&lt;/LI&gt;
&lt;LI&gt;401-600&lt;/LI&gt;
&lt;LI&gt;600+&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;FONT&gt;MY ANSWER BUT GETTING ERRORS CODES ANYONE?&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select home.RN_band* as
from home.loans_data3

case when RN_score between 0 and 200 then RN_band = '0-200';
when RN_score between 201 and 4000 then RN_band = '201-400';
when RN_score between 401 and 600 then RN_band = '401-600';
when RN_score higher 600 then RN_band = '600+';
when RN_band='errors';
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 21:11:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752715#M29787</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-07-07T21:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Create new variable in SQL</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752717#M29788</link>
      <description>&lt;P&gt;Suggestion: use formats instead of creating a new variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
    value bandf 0-200='0-200' 201-400='201-400' /* and so on */ ;
run;

/* Example */
proc summary data=have;
    class rn_score;
    format rn_score bandf.;
    var some_numeric_variables;
    output out=stats mean=;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Jul 2021 20:50:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752717#M29788</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-07T20:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create new variable in SQL</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752722#M29789</link>
      <description>Except that's very clearly a HW question.</description>
      <pubDate>Wed, 07 Jul 2021 20:55:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752722#M29789</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-07-07T20:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: HELP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752724#M29790</link>
      <description>Thank you for your quick reply having this errors code&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;BR /&gt;70&lt;BR /&gt;71 proc sql;&lt;BR /&gt;72 select home.RN_band* as&lt;BR /&gt;73 from home.loans_data3&lt;BR /&gt;74 case when RN_score between 0 and 200 then '0-200'&lt;BR /&gt;____&lt;BR /&gt;22&lt;BR /&gt;76&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: ;, ',', ANSIMISS, CROSS, EXCEPT, FULL, GROUP, HAVING, INNER, INTERSECT,&lt;BR /&gt;JOIN, LEFT, NATURAL, NOMISS, ORDER, OUTER, RIGHT, UNION, WHERE.&lt;BR /&gt;&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;&lt;BR /&gt;75 when RN_score between 201 and 4000 then '201-400'&lt;BR /&gt;76 when RN_score between 401 and 600 then '401-600'&lt;BR /&gt;77 when RN_score &amp;gt;= 600 then '601+'&lt;BR /&gt;78 else 'errors' end as rn_band;&lt;BR /&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;BR /&gt;79 quit;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;user cpu time 0.00 seconds&lt;BR /&gt;system cpu time 0.00 seconds&lt;BR /&gt;memory 211.15k&lt;BR /&gt;OS Memory 27556.00k&lt;BR /&gt;Timestamp 07/07/2021 08:57:43 PM&lt;BR /&gt;Step Count 30 Switch Count 0&lt;BR /&gt;Page Faults 0&lt;BR /&gt;Page Reclaims 20&lt;BR /&gt;Page Swaps 0&lt;BR /&gt;Voluntary Context Switches 0&lt;BR /&gt;Involuntary Context Switches 0&lt;BR /&gt;Block Input Operations 0&lt;BR /&gt;Block Output Operations 0&lt;BR /&gt;&lt;BR /&gt;80&lt;BR /&gt;81 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;BR /&gt;92&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Jul 2021 21:00:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752724#M29790</guid>
      <dc:creator>nhev</dc:creator>
      <dc:date>2021-07-07T21:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Create new variable in SQL</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752728#M29791</link>
      <description>Thank you Reeza sorry I am new will do next time but having an error code with your syntax&lt;BR /&gt;&lt;BR /&gt;76 when RN_score higher 600 then '600+'&lt;BR /&gt;______&lt;BR /&gt;22&lt;BR /&gt;76&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, (, *, **, +, -, '.', /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND, BETWEEN,&lt;BR /&gt;CONTAINS, EQ, EQT, GE, GET, GT, GTT, IN, IS, LE, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, THEN, ^, ^=, |, ||, ~,&lt;BR /&gt;~=.&lt;BR /&gt;&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;&lt;BR /&gt;77 else 'errors' end as RN_BAND&lt;BR /&gt;78 from home.loans_data3&lt;BR /&gt;79 ;</description>
      <pubDate>Wed, 07 Jul 2021 21:04:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752728#M29791</guid>
      <dc:creator>nhev</dc:creator>
      <dc:date>2021-07-07T21:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create new variable in SQL</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752729#M29792</link>
      <description>Still not the one. Thank you but I HAVE TO USE CASE WHEN&lt;BR /&gt;&lt;BR /&gt;Page Swaps 0&lt;BR /&gt;Voluntary Context Switches 13&lt;BR /&gt;Involuntary Context Switches 0&lt;BR /&gt;Block Input Operations 0&lt;BR /&gt;Block Output Operations 56&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;74&lt;BR /&gt;75 /* Example */&lt;BR /&gt;76 proc summary data=have;&lt;BR /&gt;ERROR: File WORK.HAVE.DATA does not exist.&lt;BR /&gt;77 class rn_score;&lt;BR /&gt;ERROR: No data set open to look up variables.&lt;BR /&gt;78 format rn_score bandf.;&lt;BR /&gt;79 var some_numeric_variables;&lt;BR /&gt;ERROR: No data set open to look up variables.&lt;BR /&gt;80 output out=stats mean=;&lt;BR /&gt;81 run;&lt;BR /&gt;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.STATS may be incomplete. When this step was stopped there were 0 observations and 0 variables.&lt;BR /&gt;NOTE: PROCEDURE SUMMARY used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;user cpu time 0.00 seconds&lt;BR /&gt;system cpu time 0.01 seconds&lt;BR /&gt;memory 358.28k&lt;BR /&gt;OS Memory 27812.00k&lt;BR /&gt;Timestamp 07/07/2021 09:05:03 PM&lt;BR /&gt;Step Count 43 Switch Count 2&lt;BR /&gt;Page Faults 0&lt;BR /&gt;Page Reclaims 131&lt;BR /&gt;Page Swaps 0&lt;BR /&gt;Voluntary Context Switches 9&lt;BR /&gt;Involuntary Context Switches 0&lt;BR /&gt;Block Input Operations 0&lt;BR /&gt;Block Output Operations 160&lt;BR /&gt;&lt;BR /&gt;82&lt;BR /&gt;83 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;BR /&gt;94&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Jul 2021 21:06:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752729#M29792</guid>
      <dc:creator>nhev</dc:creator>
      <dc:date>2021-07-07T21:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: HELP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752730#M29793</link>
      <description>&lt;PRE&gt;70
71 proc sql;
72 select home.RN_band* as
73 from home.loans_data3
74 case when RN_score between 0 and 200 then '0-200'&lt;/PRE&gt;
&lt;P&gt;should be&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
    create table as your_table_name as
    select rn_band,
    case when rn_score between 0 and 200 then '0-200'
         /* All the other CASE statements go here */
    from home.loans_data3;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/388722"&gt;@nhev&lt;/a&gt; ... please in the future DO NOT show us a portion of the log. We need to see the ENTIRE log (that's 100% of the log, every single character) from your PROC SQL. Please paste the log into a code box (as I have done), by clicking on the &amp;lt;/&amp;gt; icon and then pasting the log.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 21:08:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752730#M29793</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-07T21:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Create new variable in SQL</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752731#M29794</link>
      <description>Try mine again and please include the full code you submitted and your log.</description>
      <pubDate>Wed, 07 Jul 2021 21:08:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752731#M29794</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-07-07T21:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Create new variable in SQL</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752732#M29795</link>
      <description>I just updated it again - you had another bug I missed - HIGHER isn't a valid comparison operator, you need to use &amp;gt; or GT.</description>
      <pubDate>Wed, 07 Jul 2021 21:09:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752732#M29795</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-07-07T21:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Create new variable in SQL</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752739#M29796</link>
      <description>Here is yours but still not working&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;select *,&lt;BR /&gt;case when RN_score between 0 and 200 then '0-200'&lt;BR /&gt;when RN_score between 201 and 4000 then '201-400'&lt;BR /&gt;when RN_score between 401 and 600 then '401-600'&lt;BR /&gt;when RN_score higher 600 then '600+'&lt;BR /&gt;else 'errors' end as RN_BAND&lt;BR /&gt;from home.loans_data3&lt;BR /&gt;;&lt;BR /&gt;quit;</description>
      <pubDate>Wed, 07 Jul 2021 22:18:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752739#M29796</guid>
      <dc:creator>nhev</dc:creator>
      <dc:date>2021-07-07T22:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Create new variable in SQL</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752741#M29797</link>
      <description>You are a star Reeza it worked. Thank you very much I just replaced higher by &amp;gt;</description>
      <pubDate>Wed, 07 Jul 2021 22:29:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-SQL/m-p/752741#M29797</guid>
      <dc:creator>nhev</dc:creator>
      <dc:date>2021-07-07T22:29:40Z</dc:date>
    </item>
  </channel>
</rss>

