<?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 proc sql - odbc - convert numeric to character in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/proc-sql-odbc-convert-numeric-to-character/m-p/19141#M943</link>
    <description>I have an issue.. I am using the ODBC with proc sql. This is my code &lt;BR /&gt;
proc sql noprint;&lt;BR /&gt;
       connect to odbc &lt;BR /&gt;
       as atest (noprompt="DRIVER=Microsoft Excel Driver (*.xls); &lt;BR /&gt;
                            DBQ=xxxxx.xls;");&lt;BR /&gt;
       create table day4 as&lt;BR /&gt;
       select * from connection to atest&lt;BR /&gt;
       (&lt;BR /&gt;
              select * from "abc tensile test 6-2-11.is$"&lt;BR /&gt;
       );&lt;BR /&gt;
       disconnect from atest;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
Now the excel file reads in, but in my original data file I have some values for id that have 201 202 203 R201 R202. So SAS gives me missing values for all the character variables but reads in only numeric.&lt;BR /&gt;
&lt;BR /&gt;
How do I define conversion of numeric to character variable inside my data step above in proc sql.&lt;BR /&gt;
&lt;BR /&gt;
Any help is appreciated&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
    <pubDate>Wed, 22 Jun 2011 19:53:53 GMT</pubDate>
    <dc:creator>saslover</dc:creator>
    <dc:date>2011-06-22T19:53:53Z</dc:date>
    <item>
      <title>proc sql - odbc - convert numeric to character</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/proc-sql-odbc-convert-numeric-to-character/m-p/19141#M943</link>
      <description>I have an issue.. I am using the ODBC with proc sql. This is my code &lt;BR /&gt;
proc sql noprint;&lt;BR /&gt;
       connect to odbc &lt;BR /&gt;
       as atest (noprompt="DRIVER=Microsoft Excel Driver (*.xls); &lt;BR /&gt;
                            DBQ=xxxxx.xls;");&lt;BR /&gt;
       create table day4 as&lt;BR /&gt;
       select * from connection to atest&lt;BR /&gt;
       (&lt;BR /&gt;
              select * from "abc tensile test 6-2-11.is$"&lt;BR /&gt;
       );&lt;BR /&gt;
       disconnect from atest;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
Now the excel file reads in, but in my original data file I have some values for id that have 201 202 203 R201 R202. So SAS gives me missing values for all the character variables but reads in only numeric.&lt;BR /&gt;
&lt;BR /&gt;
How do I define conversion of numeric to character variable inside my data step above in proc sql.&lt;BR /&gt;
&lt;BR /&gt;
Any help is appreciated&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Wed, 22 Jun 2011 19:53:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/proc-sql-odbc-convert-numeric-to-character/m-p/19141#M943</guid>
      <dc:creator>saslover</dc:creator>
      <dc:date>2011-06-22T19:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql - odbc - convert numeric to character</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/proc-sql-odbc-convert-numeric-to-character/m-p/19142#M944</link>
      <description>That seems cumbersome.&lt;BR /&gt;
&lt;BR /&gt;
I suggest using proc import with type = mixed.</description>
      <pubDate>Wed, 22 Jun 2011 20:45:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/proc-sql-odbc-convert-numeric-to-character/m-p/19142#M944</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2011-06-22T20:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql - odbc - convert numeric to character</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/proc-sql-odbc-convert-numeric-to-character/m-p/19143#M945</link>
      <description>I cannot do that. My dataset has a whole lot of junk characters in the sheets and they are not similar across all excel files. So PROC IMPORT doesn't work.</description>
      <pubDate>Wed, 22 Jun 2011 20:48:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/proc-sql-odbc-convert-numeric-to-character/m-p/19143#M945</guid>
      <dc:creator>saslover</dc:creator>
      <dc:date>2011-06-22T20:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql - odbc - convert numeric to character</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/proc-sql-odbc-convert-numeric-to-character/m-p/19144#M946</link>
      <description>I think the dbtype= option might be what you want then.&lt;BR /&gt;
&lt;BR /&gt;
I don't know exactly wwere/how but hopefully google can help some more.</description>
      <pubDate>Wed, 22 Jun 2011 22:58:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/proc-sql-odbc-convert-numeric-to-character/m-p/19144#M946</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2011-06-22T22:58:03Z</dc:date>
    </item>
  </channel>
</rss>

