<?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: How to loading variables which are huge in length? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-loading-variables-which-are-huge-in-length/m-p/553697#M9407</link>
    <description>&lt;P&gt;thank you for replying, I have tried to set at the beginning and it didn't work earlier.&lt;/P&gt;&lt;P&gt;now I need to set next to the column needed to select.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what about character length?&amp;nbsp; Do I need to set the format next to the column too.&amp;nbsp; I did '&lt;STRONG&gt;format column n10.;&lt;/STRONG&gt; ' it didn't work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;v/r,&lt;/P&gt;&lt;P&gt;Bach-Nga&lt;/P&gt;</description>
    <pubDate>Wed, 24 Apr 2019 16:06:25 GMT</pubDate>
    <dc:creator>pepevo</dc:creator>
    <dc:date>2019-04-24T16:06:25Z</dc:date>
    <item>
      <title>How to loading variables which are huge in length?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-loading-variables-which-are-huge-in-length/m-p/553677#M9402</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello experts.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I format the column countt/column in huge length in proc sql.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Normally in Oracle we set declare the column in a new format like below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;col fieldname a10;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;col fieldname1 9999999;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have tried&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;dbsastype=(column='CHAR(10)'))&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;and didn't work&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have queries:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;select count(*) from table this one give me 1.8787E8&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;select count(*) from table1 a inner join table2 b on a.col = b.col inner join table3 c on c.col1=b.col2; the result is 1.8787E8&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;select column1, column2, column3 from table1 a inner join table2 b on a.col = b.col inner join table3 c on c.col1=b.col2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;how&amp;nbsp;can I&amp;nbsp; pull all the scientific&amp;nbsp;number in proc sql?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Bach-Nga&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 15:23:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-loading-variables-which-are-huge-in-length/m-p/553677#M9402</guid>
      <dc:creator>pepevo</dc:creator>
      <dc:date>2019-04-24T15:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to loading variables which are huge in length?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-loading-variables-which-are-huge-in-length/m-p/553683#M9403</link>
      <description>&lt;P&gt;The values you show like&lt;/P&gt;
&lt;P&gt;select count(*) from table this one give me &lt;STRONG&gt;1.8787E8&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;are numeric so attempting to set a character type is inappropriate&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should be able to use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;select count(*) format f12.&lt;/P&gt;
&lt;P&gt;to display 12 digits.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 15:38:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-loading-variables-which-are-huge-in-length/m-p/553683#M9403</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-04-24T15:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to loading variables which are huge in length?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-loading-variables-which-are-huge-in-length/m-p/553697#M9407</link>
      <description>&lt;P&gt;thank you for replying, I have tried to set at the beginning and it didn't work earlier.&lt;/P&gt;&lt;P&gt;now I need to set next to the column needed to select.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what about character length?&amp;nbsp; Do I need to set the format next to the column too.&amp;nbsp; I did '&lt;STRONG&gt;format column n10.;&lt;/STRONG&gt; ' it didn't work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;v/r,&lt;/P&gt;&lt;P&gt;Bach-Nga&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 16:06:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-loading-variables-which-are-huge-in-length/m-p/553697#M9407</guid>
      <dc:creator>pepevo</dc:creator>
      <dc:date>2019-04-24T16:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to loading variables which are huge in length?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-loading-variables-which-are-huge-in-length/m-p/553722#M9408</link>
      <description>&lt;P&gt;SAS only has two data types. Floating point numbers and fixed length character strings.&lt;/P&gt;
&lt;P&gt;The default in PROC SQL for numbers is to use BEST8.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can attach a FORMAT to your variable to help SAS understand how you want the values displayed.&lt;/P&gt;
&lt;P&gt;For your simple queries that looks like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select count(*) format=best32. from table;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you know the numbers will always be integers then you might use the 32. format (also known as the F32. format).&lt;/P&gt;
&lt;P&gt;But you might instead want to use the COMMA format to make it easier for humans to read.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 17:17:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-loading-variables-which-are-huge-in-length/m-p/553722#M9408</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-04-24T17:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to loading variables which are huge in length?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-loading-variables-which-are-huge-in-length/m-p/553728#M9409</link>
      <description>&lt;P&gt;thank you, Mr.&amp;nbsp;&lt;SPAN class="login-bold"&gt;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884" target="_self"&gt;ballardw&lt;/A&gt;&amp;nbsp;already showed me how to format the count and it worked&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;I still concern the character column as same as Oracle:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;col name a25&lt;/P&gt;&lt;P&gt;col address a30&lt;/P&gt;&lt;P&gt;select name, address from users;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;I did the same in proc sql and it didn't work;&lt;/P&gt;&lt;P&gt;select name format n25., address format n30. from users;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bach-Nga&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 17:28:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-loading-variables-which-are-huge-in-length/m-p/553728#M9409</guid>
      <dc:creator>pepevo</dc:creator>
      <dc:date>2019-04-24T17:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to loading variables which are huge in length?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-loading-variables-which-are-huge-in-length/m-p/553737#M9410</link>
      <description>&lt;P&gt;That doesn't make any sense in SAS syntax. First of all there is no need to attach a format to character variable since SAS already will display the character variable properly.&amp;nbsp; But if you did want to attach a format you need to use a character format, such as $25.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to define the LENGTH of the variable use the LENGTH= option instead.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if your source database defined NAME with a length of 4000 and you KNOW that you only need the first 25 bytes then you can use the LENGTH= option after the variable name to tell SAS to define the new variable as being only 25 bytes long.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select name length=25 ....
from mydb.mytable&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You might need to also set the format as SAS has a nasty habit of attaching formats to character variables pulled from external databases.&amp;nbsp; It would be strange to have name defined as length 25 but with the $4000. format attached to it.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 17:55:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-loading-variables-which-are-huge-in-length/m-p/553737#M9410</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-04-24T17:55:34Z</dc:date>
    </item>
  </channel>
</rss>

