<?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: convert data from character to numeric in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42792#M5056</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Code:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;data rpt_product_credit;&lt;BR /&gt;informat application_id $15.;&lt;BR /&gt;input application_id source_cd;&lt;BR /&gt;cards;&lt;BR /&gt;123456789012345 1&lt;BR /&gt;543210987654321 2&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table test as SELECT Distinct A.application_id, A.Source_CD as Source_Code&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;FROM RPT_PRODUCT_CREDIT A WHERE application_id &amp;gt; '201111*';&lt;BR /&gt;QUIT;&lt;/P&gt;&lt;P&gt;PROC EXPORT DATA= Test &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OUTFILE= "C:\Documents and Settings\TEST.XLS" &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=EXCEL REPLACE;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SHEET="T"; &lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Output from Excel:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 96pt; border-collapse: collapse;" width="128"&gt;&lt;TBODY&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD height="17" style="width: 48pt; height: 12.75pt;" width="64"&gt;&lt;A name="RANGE!A1:B2"&gt;application_id&lt;/A&gt;&lt;/TD&gt;&lt;TD style="width: 48pt;" width="64"&gt;Source_Code&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD height="17" style="height: 12.75pt;"&gt;543210987654321&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Feb 2012 21:08:35 GMT</pubDate>
    <dc:creator>Hima</dc:creator>
    <dc:date>2012-02-15T21:08:35Z</dc:date>
    <item>
      <title>convert data from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42784#M5048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello - I have scoured the community forums for previous postings and can't seem to get this work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I pulled the Application_ID in from the server, they are characters.&amp;nbsp; WHen I export the file from SAS EG 4.3 to Excel, the applicatiion_ids are in exponential format (there are 15 digits).&amp;nbsp; I want excel to show me the entire 15-digits.&amp;nbsp; Below is my code..&amp;nbsp; When I run it, it errors out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT Distinct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A.application_id ,&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; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input(A.application_id,&lt;/SPAN&gt;&lt;STRONG style="color: #008080; font-size: 12pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 12pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 12pt; font-family: Courier New;"&gt;15.&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Courier New;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;APP_ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A.Source_CD&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; as Source_Code&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM RPT_PRODUCT_CREDIT A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE application_id &amp;gt; '201111*'&lt;/P&gt;&lt;P&gt;&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; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I convert the application_id from character to numeric?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 00:24:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42784#M5048</guid>
      <dc:creator>jen123</dc:creator>
      <dc:date>2012-02-01T00:24:23Z</dc:date>
    </item>
    <item>
      <title>convert data from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42785#M5049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think this is valid syntax, unless it is on your server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE application_id &amp;gt; '201111*'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What error are you getting?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 00:37:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42785#M5049</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-02-01T00:37:15Z</dc:date>
    </item>
    <item>
      <title>convert data from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42786#M5050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have an extra ) in your call, and your where statement sure looks like part of a date or datetime, but I think what you are missing is a format.&amp;nbsp; Does the following approximate what you have and want?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data rpt_product_credit;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat application_id $15.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input application_id source_cd;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;123456789012345 1&lt;/P&gt;&lt;P&gt;543210987654321 2&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table want as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT Distinct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A.application_id ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input(A.application_id,15.) as APP_ID format=best32.,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A.Source_CD as Source_Code&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM RPT_PRODUCT_CREDIT A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE application_id &amp;gt; '201111*'&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 00:46:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42786#M5050</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-01T00:46:32Z</dc:date>
    </item>
    <item>
      <title>convert data from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42787#M5051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Yes, the WHERE statement is to pull data from our server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Art297 -I tried your code above and got an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought the "15" in the stmt is the format: input(A.application_id,15.) as APP_ID???&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Running my original code, the error I received is below.&amp;nbsp; I think I am using the INPUT or PUT function incorrectly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ERROR: ORACLE prepare error: ORA-00904: "INPUT": invalid identifier. SQL statement: SELECT Distinct A.application_id, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input(A.application_id,15.) as APP_ID, A.Source_CD as Source_Code FROM RPT_PRODUCT_CREDIT A WHERE application_id &amp;gt; &lt;/P&gt;&lt;P&gt;'201111*'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 13:14:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42787#M5051</guid>
      <dc:creator>jen123</dc:creator>
      <dc:date>2012-02-01T13:14:54Z</dc:date>
    </item>
    <item>
      <title>convert data from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42788#M5052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You appear to be doing the processing in Oracle rather than SAS (SQL passthru I presume), thus the commands have to be compliant with Oracle.&amp;nbsp; I would talk to your IT folk and find out what the exact format of that field is and, in Oracle SQL, how you would select the desired entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I mentioned, from your where condition, it sure looks like it might be an Oracle datetime field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 13:42:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42788#M5052</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-01T13:42:47Z</dc:date>
    </item>
    <item>
      <title>convert data from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42789#M5053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I have a slightly different take on your issue.&amp;nbsp; I am not sure this is Oracle/sas issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you examine the id field in EG,&amp;nbsp; do you see all characters correctly?&amp;nbsp; If so, this is issue with translation from SAS to Excel. I would guess that SAS has saved the field as a numeric and is writing a numeric in the spreadsheet. Can you check that?&amp;nbsp; If so, try searching for the topic of forcing the value to be saved as string in spreadsheet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 15:24:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42789#M5053</guid>
      <dc:creator>LarryWorley</dc:creator>
      <dc:date>2012-02-01T15:24:49Z</dc:date>
    </item>
    <item>
      <title>convert data from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42790#M5054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think Larry is correct. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the main issue is the number isn't rendering correctly in Excel that's probably an excel issue where it automatically tries to convert an all number field to a number. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you still want to convert to a character in the query, try the ORACLE to_char function rather than input, to_char(acct_id, '000000000000000')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 17:03:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42790#M5054</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-02-01T17:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: convert data from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42791#M5055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; No matter whether you have a text variable or a numeric variable, once the number gets to Excel, Excel has certain defaults that it uses when it "gets" what it thinks is a number. The only way that I know of around the Excel defaults (such as the width of a column or how it treats a number or a date), is to use ODS methods to get your file from SAS to Excel. (By ODS methods, I mean using ODS MSOFFICE2K and/or ODS TAGSETS.EXCELXP).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If you are using ODS methods to get your output into Excel (versus PROC EXPORT or the LIBNAME engine), then you do have some control over what format Excel should use to display the number in the worksheet. For HTML-based results, you have to use the MSO-NUMBER-FORMAT style property with the HTMLSTYLE attribute, as shown for the ISBN variable in this paper &lt;A href="http://support.sas.com/resources/papers/proceedings11/266-2011.pdf"&gt;http://support.sas.com/resources/papers/proceedings11/266-2011.pdf&lt;/A&gt; (on pages 2-5). One way to deal with the situation is to tell Excel to treat the number as text (using @).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; But exactly 15 digits is running into the size of number that Excel starts to fiddle with. I would be tempted to use an actual number format for Excel instead of the TEXT method. The program below uses an MSO-NUMBER-FORMAT to make Excel show all 15 digits -- whether the value is character (APPLICATION_ID) or numeric (APP_ID2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Do note that with ODS MSOFFICE2K, I am creating an HTML file that Excel 2000 and higher knows how to open and render as a worksheet. Naming the file with the .xls extension is not creating a "true, binary" Excel file, instead, I am merely fooling the Windows Registry into launching Excel (instead of a browser) when I double click on the file name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;data rpt_product_credit;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; length application_id $15. app_id2 8;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; infile datalines;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; input application_id $ source_cd;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; app_id2 = input(application_id, 15.);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; return;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; datalines;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;123456789012345 1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;543210987654321 2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods msoffice2k file='c:\temp\not_exponent.xls'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; style=sasweb;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc report data=rpt_product_credit nowd;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; column source_cd application_id app_id2;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; title '1) Without Any Format instructions for Excel';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc report data=rpt_product_credit nowd;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; column source_cd application_id app_id2;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; title '2) With Microsoft Format';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; define application_id/ display f=$15.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)={htmlstyle="mso-number-format:###############"};&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; define app_id2/ display f=15.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)={htmlstyle="mso-number-format:###############"};&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods msoffice2k close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 20:28:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42791#M5055</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-02-01T20:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: convert data from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42792#M5056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Code:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;data rpt_product_credit;&lt;BR /&gt;informat application_id $15.;&lt;BR /&gt;input application_id source_cd;&lt;BR /&gt;cards;&lt;BR /&gt;123456789012345 1&lt;BR /&gt;543210987654321 2&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table test as SELECT Distinct A.application_id, A.Source_CD as Source_Code&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;FROM RPT_PRODUCT_CREDIT A WHERE application_id &amp;gt; '201111*';&lt;BR /&gt;QUIT;&lt;/P&gt;&lt;P&gt;PROC EXPORT DATA= Test &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OUTFILE= "C:\Documents and Settings\TEST.XLS" &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=EXCEL REPLACE;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SHEET="T"; &lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Output from Excel:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 96pt; border-collapse: collapse;" width="128"&gt;&lt;TBODY&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD height="17" style="width: 48pt; height: 12.75pt;" width="64"&gt;&lt;A name="RANGE!A1:B2"&gt;application_id&lt;/A&gt;&lt;/TD&gt;&lt;TD style="width: 48pt;" width="64"&gt;Source_Code&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD height="17" style="height: 12.75pt;"&gt;543210987654321&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2012 21:08:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/convert-data-from-character-to-numeric/m-p/42792#M5056</guid>
      <dc:creator>Hima</dc:creator>
      <dc:date>2012-02-15T21:08:35Z</dc:date>
    </item>
  </channel>
</rss>

