<?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: Numeric Format Error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Numeric-Format-Error/m-p/417834#M102633</link>
    <description>&lt;P&gt;If your AppVintage is a datetime then the value is numeric and so you cannot assign $char format. You likely would want something like DATETIME20. (or a larger number if you need to see decimal second values).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your Strategy variable is actually numeric you would have the same error.&lt;/P&gt;</description>
    <pubDate>Fri, 01 Dec 2017 20:00:03 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-12-01T20:00:03Z</dc:date>
    <item>
      <title>Numeric Format Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-Format-Error/m-p/417825#M102631</link>
      <description>&lt;PRE&gt;Proc SQL;
Create table Results.VarResultsCL as
SELECT
 AppVintage format = $CHAR24.
,Strategy format = $CHAR24.
,Approval_Rate_Diff format = percent12.2
,Activation_Rate_Diff format = percent12.2
FROM Portrevw.awm_aa_variance_cl;
quit;&lt;/PRE&gt;&lt;P&gt;I am using that code to create a SAS data set. However, when I run it, I get this error:&lt;/P&gt;&lt;P&gt;ERROR: Numeric expression requires a numeric format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The format from the SQL table for AppVintage is datetime, null&lt;/P&gt;&lt;P&gt;The format for approval_Rate_Diff and activation_rate_diff is decimal(5,4),null&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;a&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 19:40:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-Format-Error/m-p/417825#M102631</guid>
      <dc:creator>awmeyertimmy</dc:creator>
      <dc:date>2017-12-01T19:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric Format Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-Format-Error/m-p/417834#M102633</link>
      <description>&lt;P&gt;If your AppVintage is a datetime then the value is numeric and so you cannot assign $char format. You likely would want something like DATETIME20. (or a larger number if you need to see decimal second values).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your Strategy variable is actually numeric you would have the same error.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 20:00:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-Format-Error/m-p/417834#M102633</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-12-01T20:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric Format Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-Format-Error/m-p/417846#M102635</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Most cases DBMS have datetime even there is no time(0's), if this is your case or if you don't need the time and need only the date then use DATEPART() function.&lt;/P&gt;&lt;P&gt;DATEPART(AppVintage) format=DATE9. as Appvintage&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 20:27:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-Format-Error/m-p/417846#M102635</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2017-12-01T20:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric Format Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-Format-Error/m-p/417851#M102636</link>
      <description>&lt;P&gt;Why attach any formats?&amp;nbsp; Why not just use the formats that SAS figures out from looking into the external database?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table Results.VarResultsCL as
  select
   AppVintage
  ,Strategy
  ,Approval_Rate_Diff
  ,Activation_Rate_Diff
  from Portrevw.awm_aa_variance_cl
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Dec 2017 20:48:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-Format-Error/m-p/417851#M102636</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-12-01T20:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric Format Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-Format-Error/m-p/417867#M102642</link>
      <description>&lt;P&gt;Works great! Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 21:20:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-Format-Error/m-p/417867#M102642</guid>
      <dc:creator>awmeyertimmy</dc:creator>
      <dc:date>2017-12-01T21:20:17Z</dc:date>
    </item>
  </channel>
</rss>

