<?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: Removing $ sign from numeric field and just store numbers in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Removing-sign-from-numeric-field-and-just-store-numbers/m-p/437429#M108909</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you can try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql ;&lt;BR /&gt;create table &lt;SPAN&gt;table .aa_tes&amp;nbsp;&lt;/SPAN&gt;as&lt;BR /&gt;select&lt;BR /&gt;&lt;SPAN&gt;run_date&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;,put(amt, comma12.) as NUMVAR&lt;BR /&gt;from &lt;SPAN&gt;rx_off.MonthlySummary&lt;/SPAN&gt;&lt;BR /&gt;where &lt;SPAN&gt;run_date&lt;/SPAN&gt; &amp;gt;= '01feb2018'd&lt;BR /&gt;;&lt;BR /&gt;quit;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Feb 2018 07:00:36 GMT</pubDate>
    <dc:creator>srinath3111</dc:creator>
    <dc:date>2018-02-15T07:00:36Z</dc:date>
    <item>
      <title>Removing $ sign from numeric field and just store numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-sign-from-numeric-field-and-just-store-numbers/m-p/437395#M108893</link>
      <description>&lt;P&gt;Hi, I have data in SQL server where YTD amount is stored with $ sign. I need to create SAS dataset without '$' sign in the table. Please help..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote my sas program like below but giving error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;create table .aa_test&amp;nbsp; as&lt;BR /&gt;select Original_amt_YTD as S_ACCTNUM (S_ACCTNUM =Input(Original_amt_YTD, 12.))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from rx_off.MonthlySummary&lt;BR /&gt;where run_date &amp;gt;= '01feb2018'd;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where Orig_amt_YTD value is&amp;nbsp; "$1234545.98"&amp;nbsp;&amp;nbsp; and i want it as&amp;nbsp; 1234545.98 in my SAS table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 01:25:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-sign-from-numeric-field-and-just-store-numbers/m-p/437395#M108893</guid>
      <dc:creator>sgarg</dc:creator>
      <dc:date>2018-02-15T01:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Removing $ sign from numeric field and just store numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-sign-from-numeric-field-and-just-store-numbers/m-p/437396#M108894</link>
      <description>&lt;P&gt;Use the COMMA informat. It will ignore commas and dollar signs.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql ;
create table .aa_test  as
  select
    Original_amt_YTD as CHARVAR
  , Input(Original_amt_YTD, comma12.) as NUMVAR
  from rx_off.MonthlySummary
  where run_date &amp;gt;= '01feb2018'd
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Feb 2018 01:29:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-sign-from-numeric-field-and-just-store-numbers/m-p/437396#M108894</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-02-15T01:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Removing $ sign from numeric field and just store numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-sign-from-numeric-field-and-just-store-numbers/m-p/437423#M108906</link>
      <description>&lt;P&gt;Thanks Tom for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am curious if&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;# Variable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type&amp;nbsp; Len Format&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Informat&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;8 Original_amy_YTD&amp;nbsp; Num&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8 DOLLAR23.2&amp;nbsp;&amp;nbsp; DOLLAR23.2&amp;nbsp;&amp;nbsp; Original_amt_YTD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then how to remove $ from the value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 06:34:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-sign-from-numeric-field-and-just-store-numbers/m-p/437423#M108906</guid>
      <dc:creator>sgarg</dc:creator>
      <dc:date>2018-02-15T06:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Removing $ sign from numeric field and just store numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-sign-from-numeric-field-and-just-store-numbers/m-p/437429#M108909</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you can try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql ;&lt;BR /&gt;create table &lt;SPAN&gt;table .aa_tes&amp;nbsp;&lt;/SPAN&gt;as&lt;BR /&gt;select&lt;BR /&gt;&lt;SPAN&gt;run_date&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;,put(amt, comma12.) as NUMVAR&lt;BR /&gt;from &lt;SPAN&gt;rx_off.MonthlySummary&lt;/SPAN&gt;&lt;BR /&gt;where &lt;SPAN&gt;run_date&lt;/SPAN&gt; &amp;gt;= '01feb2018'd&lt;BR /&gt;;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 07:00:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-sign-from-numeric-field-and-just-store-numbers/m-p/437429#M108909</guid>
      <dc:creator>srinath3111</dc:creator>
      <dc:date>2018-02-15T07:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Removing $ sign from numeric field and just store numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-sign-from-numeric-field-and-just-store-numbers/m-p/437433#M108910</link>
      <description>&lt;P&gt;You posted the vital information here.&amp;nbsp; Original_amt_YTD does not contain a dollar sign.&amp;nbsp; (Tom's solution would have been correct if it did.)&amp;nbsp; It is numeric, but has a format that displays it using a dollar sign.&amp;nbsp; The solution would be to change the format.&amp;nbsp; I'm not 100% certain of how to say it, but you can test this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;PROC SQL;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;create table aa_test&amp;nbsp; as&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;select Original_amt_YTD as S_ACCTNUM format=comma15.2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from rx_off.MonthlySummary&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;where run_date &amp;gt;= '01feb2018'd;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can choose the width that you would like ... 15 is an arbitrary choice.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 07:35:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-sign-from-numeric-field-and-just-store-numbers/m-p/437433#M108910</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-02-15T07:35:16Z</dc:date>
    </item>
  </channel>
</rss>

