<?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: Can we convert numeric variable into a character var in the sql extraction process ? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Can-we-convert-numeric-variable-into-a-character-var-in-the-sql/m-p/264301#M57767</link>
    <description>&lt;P&gt;Thanks so much for this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt;char_account_number = put(account_number, &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt;$15.&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt;) ; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt; account_number ; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt;rename&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt; char_account_number=account_number ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&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;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt;I'm sure that there are other ways to accomplish this, but this certainly worked for me.&amp;nbsp; I am posting SAS data to a SQL server and SAS likes to push dates as numeric.&amp;nbsp; I've tried various versions of the PUT statement, FORMAT, etc.&amp;nbsp; But this did it.&amp;nbsp; Thanks again.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Apr 2016 22:18:33 GMT</pubDate>
    <dc:creator>beatledodger</dc:creator>
    <dc:date>2016-04-15T22:18:33Z</dc:date>
    <item>
      <title>Can we convert numeric variable into a character var in the sql extraction process ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Can-we-convert-numeric-variable-into-a-character-var-in-the-sql/m-p/79629#M22929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hi SAS Forum,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have the attached data set.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #575757; font-size: 10pt;"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #575757; font-size: 10pt;"&gt;I have got the sum of variables named “principal” and “write_off_total” by account_number using below sql code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: yellow; font-size: 10pt;"&gt;(Art and Tish have helped me to introduce date formatting in this sql code).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: navy; font-size: 9pt;"&gt;proc&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: navy; font-size: 9pt;"&gt;sql&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;create&lt;/SPAN&gt; &lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; want &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;select&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(bank_number)&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;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; bank_number&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min (ACCOUNT_NUMBER)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; ACCOUNT_NUMBER&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(country)&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; &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; country&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(branch_number)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; branch_number&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(currency_code)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; currency_code&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max (POST_DATE)&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;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; POST_DATE&amp;nbsp;&amp;nbsp;&amp;nbsp; Format=date9.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max (EFFECTIVE_DATE)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; EFFECTIVE_DATE Format=date9.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum (PRINCIPAL)&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;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; sum_PRINCIPAL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum (Write_off_Total)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; net_Write_off_Total&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;from&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; b.post_this_data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;group&lt;/SPAN&gt; &lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; account_number&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: navy; font-size: 9pt;"&gt;quit&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; text-decoration: underline;"&gt;Background:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Account_number and Branch_number are numerics. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I need to convert them to character variables. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;What I have done, I have converted them using following two steps after the above sql extraction.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;char_account_number = put(account_number, &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 11pt;"&gt;$15.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;) ; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; account_number ; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;rename&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; char_account_number=account_number ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;char_branch_number = put(branch_number, &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 11pt;"&gt;$7.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;) ; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; branch_number ; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;rename&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; char_branch_number=branch_number ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10pt; text-decoration: underline;"&gt;Questions:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: red; font-size: 10pt;"&gt;i). I wonder if this procedure is correct &lt;SPAN style="background: yellow;"&gt;?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: yellow; font-size: 10pt;"&gt; I noted the value moved to middle of cell in “account_number” variable and moved to the left hand corner of the cell in “Branch_number” variable after this conversion (suspicious!).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: red; font-size: 10pt;"&gt;ii). Can we do this conversion at the sql extraction process itself?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Mirisage&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 17:26:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Can-we-convert-numeric-variable-into-a-character-var-in-the-sql/m-p/79629#M22929</guid>
      <dc:creator>Mirisage</dc:creator>
      <dc:date>2012-07-31T17:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Can we convert numeric variable into a character var in the sql extraction process ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Can-we-convert-numeric-variable-into-a-character-var-in-the-sql/m-p/79630#M22930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ii) yes, you may use :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&lt;STRONG&gt;put(account_number, &lt;SPAN style="background: white; color: teal;"&gt;15.&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black;"&gt;) as account_number, put(min(branch_number),7.) as branch_number,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;in the SQL query.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;PG&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 17:36:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Can-we-convert-numeric-variable-into-a-character-var-in-the-sql/m-p/79630#M22930</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-07-31T17:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can we convert numeric variable into a character var in the sql extraction process ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Can-we-convert-numeric-variable-into-a-character-var-in-the-sql/m-p/79631#M22931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am foreign to the realm of banking, but somehow, I think this query should be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sql;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;create table want as &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;select &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; country, bank_number, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put(branch_number, 7.) as branch_number,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put(account_number, 15.) as account_number,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; currency_code,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;max (POST_DATE)&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 POST_DATE&amp;nbsp;&amp;nbsp;&amp;nbsp; Format=date9.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max (EFFECTIVE_DATE)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as EFFECTIVE_DATE Format=date9.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum (PRINCIPAL)&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 sum_PRINCIPAL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum (Write_off_Total)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as net_Write_off_Total&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;from b.post_this_data&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;group by country, bank_number, branch_number, account_number, currency_code&lt;/STRONG&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 17:51:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Can-we-convert-numeric-variable-into-a-character-var-in-the-sql/m-p/79631#M22931</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-07-31T17:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can we convert numeric variable into a character var in the sql extraction process ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Can-we-convert-numeric-variable-into-a-character-var-in-the-sql/m-p/79632#M22932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: navy; font-size: 9pt;"&gt;You can use the following code, And you can avoid the two data steps after the SQL. &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: navy; font-size: 9pt;"&gt;-use PUT to convert the numeric to Character &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: navy; font-size: 9pt;"&gt;-LEFT to left align the character values&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: navy; font-size: 9pt;"&gt;proc&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: navy; font-size: 9pt;"&gt;sql&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;create&lt;/SPAN&gt; &lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; want &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;select&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(bank_number)&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;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; bank_number&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left((put(min (ACCOUNT_NUMBER),7.)) &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; ACCOUNT_NUMBER&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(country)&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; &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; country&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left((put(min(branch_number),15.))&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; branch_number&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(currency_code)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; currency_code&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max (POST_DATE)&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;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; POST_DATE&amp;nbsp;&amp;nbsp;&amp;nbsp; Format=date9.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max (EFFECTIVE_DATE)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; EFFECTIVE_DATE Format=date9.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum (PRINCIPAL)&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;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; sum_PRINCIPAL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum (Write_off_Total)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; net_Write_off_Total&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;from&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; b.post_this_data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;group&lt;/SPAN&gt; &lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; account_number&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: navy; font-size: 9pt;"&gt;quit&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 17:53:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Can-we-convert-numeric-variable-into-a-character-var-in-the-sql/m-p/79632#M22932</guid>
      <dc:creator>SGB</dc:creator>
      <dc:date>2012-07-31T17:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can we convert numeric variable into a character var in the sql extraction process ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Can-we-convert-numeric-variable-into-a-character-var-in-the-sql/m-p/79633#M22933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi PGStats and SGB,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for both of you.&lt;/P&gt;&lt;P&gt;This is great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi SGB,&lt;/P&gt;&lt;P&gt;Would inclusion of the the "Left" statement intentionally hurt joinning my tables with "ACCOUNT_NUMBER" as the joining variable?&lt;/P&gt;&lt;P&gt;Why I am asking this is I have not intentionally left aligned this variable in my other tables and I need to do several joins with those tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mirisage&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 19:25:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Can-we-convert-numeric-variable-into-a-character-var-in-the-sql/m-p/79633#M22933</guid>
      <dc:creator>Mirisage</dc:creator>
      <dc:date>2012-07-31T19:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can we convert numeric variable into a character var in the sql extraction process ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Can-we-convert-numeric-variable-into-a-character-var-in-the-sql/m-p/79634#M22934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mirisage!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have mentioned the following..&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: yellow; font-size: 10pt;"&gt;I noted the value moved to middle of cell in “account_number” variable and moved to the left hand corner of the cell in “Branch_number” variable after this conversion (suspicious!).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence I suspected that there might be &lt;SPAN style="text-decoration: underline;"&gt;leading blanks&lt;/SPAN&gt; in account_number, and hence included left.&lt;/P&gt;&lt;P&gt;Left removes the leading blanks and left aligns the character.&lt;/P&gt;&lt;P&gt;The account_number with and without leading blanks would be treated as different values for the variable while merging. &lt;BR /&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 17:19:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Can-we-convert-numeric-variable-into-a-character-var-in-the-sql/m-p/79634#M22934</guid>
      <dc:creator>SGB</dc:creator>
      <dc:date>2012-08-01T17:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can we convert numeric variable into a character var in the sql extraction process ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Can-we-convert-numeric-variable-into-a-character-var-in-the-sql/m-p/79635#M22935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much SBG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mirisage&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2012 01:54:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Can-we-convert-numeric-variable-into-a-character-var-in-the-sql/m-p/79635#M22935</guid>
      <dc:creator>Mirisage</dc:creator>
      <dc:date>2012-08-08T01:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Can we convert numeric variable into a character var in the sql extraction process ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Can-we-convert-numeric-variable-into-a-character-var-in-the-sql/m-p/264301#M57767</link>
      <description>&lt;P&gt;Thanks so much for this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt;char_account_number = put(account_number, &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt;$15.&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt;) ; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt; account_number ; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt;rename&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt; char_account_number=account_number ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&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;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 11pt;"&gt;I'm sure that there are other ways to accomplish this, but this certainly worked for me.&amp;nbsp; I am posting SAS data to a SQL server and SAS likes to push dates as numeric.&amp;nbsp; I've tried various versions of the PUT statement, FORMAT, etc.&amp;nbsp; But this did it.&amp;nbsp; Thanks again.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2016 22:18:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Can-we-convert-numeric-variable-into-a-character-var-in-the-sql/m-p/264301#M57767</guid>
      <dc:creator>beatledodger</dc:creator>
      <dc:date>2016-04-15T22:18:33Z</dc:date>
    </item>
  </channel>
</rss>

