<?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: number formatting in proc sql passthrough or oracle in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/number-formatting-in-proc-sql-passthrough-or-oracle/m-p/248189#M46602</link>
    <description>&lt;P&gt;In the SAS dataset/table MYTAB, what is the type of the variable COLUMN - character or numeric? Also what is the SAS format for the variable if any?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Feb 2016 08:25:46 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2016-02-05T08:25:46Z</dc:date>
    <item>
      <title>number formatting in proc sql passthrough or oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/number-formatting-in-proc-sql-passthrough-or-oracle/m-p/248183#M46597</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wrote some proc sql to retrieve data from our Oracle DB.&lt;/P&gt;
&lt;P&gt;Unfortunately the number formatting is a bit unfortunate on the Oracle side,&lt;/P&gt;
&lt;P&gt;some Excel ETL process did not fix it now I have to do it on the reporting side.&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;proc&lt;/STRONG&gt; &lt;STRONG&gt;sql&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; connect to oracle as xxx (user=xxx password=xxxx' path=DATABASE);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create table mytab as&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; select * from connection to xxx&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SELECT &lt;STRONG&gt;column from table&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; );&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; disconnect from xxx;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The column shows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1000,000&lt;/P&gt;
&lt;P&gt;0,010&lt;/P&gt;
&lt;P&gt;1,000&lt;/P&gt;
&lt;P&gt;-&lt;/P&gt;
&lt;P&gt;null&lt;/P&gt;
&lt;P&gt;&amp;gt;SGF&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So its not all numbers really but if its a number I need to format it correctly i.e.&lt;/P&gt;
&lt;P&gt;without decimal places if they are just trailing 0&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 07:32:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/number-formatting-in-proc-sql-passthrough-or-oracle/m-p/248183#M46597</guid>
      <dc:creator>metallon</dc:creator>
      <dc:date>2016-02-05T07:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: number formatting in proc sql passthrough or oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/number-formatting-in-proc-sql-passthrough-or-oracle/m-p/248189#M46602</link>
      <description>&lt;P&gt;In the SAS dataset/table MYTAB, what is the type of the variable COLUMN - character or numeric? Also what is the SAS format for the variable if any?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 08:25:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/number-formatting-in-proc-sql-passthrough-or-oracle/m-p/248189#M46602</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-02-05T08:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: number formatting in proc sql passthrough or oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/number-formatting-in-proc-sql-passthrough-or-oracle/m-p/248308#M46639</link>
      <description>&lt;P&gt;Your example data looks like it may have a fixed decimal format with a forced 3 decimal values, possibly something like 10.3 . The values are no different&amp;nbsp; but if you do not want trailing zeroes shown then assign a BEST format like BEST10.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 16:21:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/number-formatting-in-proc-sql-passthrough-or-oracle/m-p/248308#M46639</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-02-05T16:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: number formatting in proc sql passthrough or oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/number-formatting-in-proc-sql-passthrough-or-oracle/m-p/248334#M46647</link>
      <description>Why are you using explicit pass thru?&lt;BR /&gt;Nothing in your query indicates that you'll benefit from that.&lt;BR /&gt;&lt;BR /&gt;As you say, it seems to be a char column. If you issue a libname to that schema you could use proc contents to see how SAS maps this column (by default).</description>
      <pubDate>Fri, 05 Feb 2016 16:52:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/number-formatting-in-proc-sql-passthrough-or-oracle/m-p/248334#M46647</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-02-05T16:52:50Z</dc:date>
    </item>
  </channel>
</rss>

