<?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: how to change data one as 1 and two as 2 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-change-data-one-as-1-and-two-as-2/m-p/612645#M178809</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/278636"&gt;@Risi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NB:&amp;nbsp;&lt;SPAN&gt;The WORDS&lt;/SPAN&gt;&lt;SPAN class="emph"&gt;w&lt;/SPAN&gt;&lt;SPAN&gt;. format converts numeric values to their equivalent in English words.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
	input V1$;
	datalines;
one
two
three
seven
;
run;

data convert;
  do num=1 to 100;
    V1=put(num,words100.);
    output;
  end;
run;

proc sql noprint;
	create table want as
	select a.V1, b.num
	from have as a left join convert as b on a.V1 = b.V1
	order by a.V1;
quit;
&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Have" style="width: 108px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34899iE0C11246BEF66FBE/image-size/small?v=v2&amp;amp;px=200" role="button" title="Capture d’écran 2019-12-18 à 13.58.11.png" alt="Have" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Have&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Want" style="width: 166px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34900i1EE8ED7BD9F42A2D/image-size/small?v=v2&amp;amp;px=200" role="button" title="Capture d’écran 2019-12-18 à 13.58.18.png" alt="Want" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Want&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Dec 2019 13:08:37 GMT</pubDate>
    <dc:creator>ed_sas_member</dc:creator>
    <dc:date>2019-12-18T13:08:37Z</dc:date>
    <item>
      <title>how to change data one as 1 and two as 2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-change-data-one-as-1-and-two-as-2/m-p/612627#M178807</link>
      <description />
      <pubDate>Wed, 18 Dec 2019 12:26:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-change-data-one-as-1-and-two-as-2/m-p/612627#M178807</guid>
      <dc:creator>Risi</dc:creator>
      <dc:date>2019-12-18T12:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to change data one as 1 and two as 2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-change-data-one-as-1-and-two-as-2/m-p/612645#M178809</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/278636"&gt;@Risi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NB:&amp;nbsp;&lt;SPAN&gt;The WORDS&lt;/SPAN&gt;&lt;SPAN class="emph"&gt;w&lt;/SPAN&gt;&lt;SPAN&gt;. format converts numeric values to their equivalent in English words.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
	input V1$;
	datalines;
one
two
three
seven
;
run;

data convert;
  do num=1 to 100;
    V1=put(num,words100.);
    output;
  end;
run;

proc sql noprint;
	create table want as
	select a.V1, b.num
	from have as a left join convert as b on a.V1 = b.V1
	order by a.V1;
quit;
&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Have" style="width: 108px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34899iE0C11246BEF66FBE/image-size/small?v=v2&amp;amp;px=200" role="button" title="Capture d’écran 2019-12-18 à 13.58.11.png" alt="Have" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Have&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Want" style="width: 166px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34900i1EE8ED7BD9F42A2D/image-size/small?v=v2&amp;amp;px=200" role="button" title="Capture d’écran 2019-12-18 à 13.58.18.png" alt="Want" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Want&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 13:08:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-change-data-one-as-1-and-two-as-2/m-p/612645#M178809</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2019-12-18T13:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to change data one as 1 and two as 2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-change-data-one-as-1-and-two-as-2/m-p/612725#M178837</link>
      <description>&lt;P&gt;Details matter.&lt;/P&gt;
&lt;P&gt;Do you mean to change a TEXT value of 'one' to a numeric value of 1 for computation?&lt;/P&gt;
&lt;P&gt;Or just to display a text value of 'one' as text value of '1'?&lt;/P&gt;
&lt;P&gt;How many of these the text values are involved? Just 'one' and 'two' or a large number? Are there other text values in the variable that are not "numbers" such as "NA" or "missing".&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 17:10:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-change-data-one-as-1-and-two-as-2/m-p/612725#M178837</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-12-19T17:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to change data one as 1 and two as 2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-change-data-one-as-1-and-two-as-2/m-p/612897#M178926</link>
      <description>&lt;P&gt;Use the &lt;FONT face="courier new,courier"&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000201455.htm" target="_self"&gt;words&lt;/A&gt; &lt;/FONT&gt;format.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 02:03:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-change-data-one-as-1-and-two-as-2/m-p/612897#M178926</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-12-19T02:03:00Z</dc:date>
    </item>
  </channel>
</rss>

