<?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 SQL SERVER CODE TO SAS in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/CONVERT-SQL-SERVER-CODE-TO-SAS/m-p/499461#M152</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Regarding the column length, if a numerical variable allowed only two digits, what will be the column length?&lt;/P&gt;&lt;P&gt;if the numerical variable permits 10 digits, what will be the column length?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Sep 2018 12:29:50 GMT</pubDate>
    <dc:creator>alepage</dc:creator>
    <dc:date>2018-09-27T12:29:50Z</dc:date>
    <item>
      <title>CONVERT SQL SERVER CODE TO SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/CONVERT-SQL-SERVER-CODE-TO-SAS/m-p/499201#M112</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's an example of the SQL code I am dealing with. (The variable name has been changed for security purpose)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CREATE TABLE "test"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (&amp;nbsp;"var1" NUMBER(12,0) NOT NULL ENABLE,&lt;BR /&gt;&amp;nbsp;"var2" NUMBER(2,0) NOT NULL ENABLE,&lt;BR /&gt;&amp;nbsp;"var3" NUMBER(10,0), &amp;nbsp;&lt;BR /&gt;&amp;nbsp;"var4" NUMBER(3,0), &amp;nbsp;&lt;BR /&gt;&amp;nbsp;"var5" NUMBER(15,2),&lt;BR /&gt;&amp;nbsp;"var6" NUMBER(15,2),&lt;BR /&gt;&amp;nbsp;"var7" NUMBER(15,2),&lt;BR /&gt;&amp;nbsp;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have consulted the following page:&amp;nbsp; &lt;A href="http://support.sas.com/documentation/cdl/en/sqlproc/63043/HTML/default/viewer.htm#n0v236a0ti4nmen1mmw4gexjd0tg.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/sqlproc/63043/HTML/default/viewer.htm#n0v236a0ti4nmen1mmw4gexjd0tg.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as I have understood from my reading, I have transformed &amp;nbsp;this code into SAS code as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;Proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;Sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;CREATE&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;TABLE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; test&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;( var1 numeric format = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;12.0&lt;/FONT&gt;&lt;/STRONG&gt;&amp;nbsp; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;not&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;null&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;var2 numeric format =&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2.0&lt;/FONT&gt;&lt;/STRONG&gt;&amp;nbsp; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;NOT&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;NULL&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;var3 numeric format =&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;10.0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;var4 numeric format =&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;3.0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;var5 numeric format =&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;15.2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;var6 numeric format =&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;15.2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;var7 numeric format =&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;15.2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;Quit&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it the similar SAS format or close to the SQL format?&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 17:46:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/CONVERT-SQL-SERVER-CODE-TO-SAS/m-p/499201#M112</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2018-09-26T17:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: CONVERT SQL SERVER CODE TO SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/CONVERT-SQL-SERVER-CODE-TO-SAS/m-p/499338#M142</link>
      <description>"Close" is a matter of opinion. But they are mot the same. &lt;BR /&gt;While databases use this to specifiy precision in storage, SAS formats only specify the default display. Precision in is only managed by the column length.&lt;BR /&gt;Also the numbers in the format have slightly different meaning. The first number covers the full length of the displayed value, including any signs, separators and decimals.</description>
      <pubDate>Thu, 27 Sep 2018 01:26:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/CONVERT-SQL-SERVER-CODE-TO-SAS/m-p/499338#M142</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-09-27T01:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: CONVERT SQL SERVER CODE TO SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/CONVERT-SQL-SERVER-CODE-TO-SAS/m-p/499461#M152</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Regarding the column length, if a numerical variable allowed only two digits, what will be the column length?&lt;/P&gt;&lt;P&gt;if the numerical variable permits 10 digits, what will be the column length?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 12:29:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/CONVERT-SQL-SERVER-CODE-TO-SAS/m-p/499461#M152</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2018-09-27T12:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: CONVERT SQL SERVER CODE TO SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/CONVERT-SQL-SERVER-CODE-TO-SAS/m-p/499465#M154</link>
      <description>&lt;P&gt;By default, SAS numeric variables have a length of 8 (bytes).&amp;nbsp; There usually is not a reason to change that unless you have some strict requirements for storage.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For precision in reporting and for classification in analytics, you can use SAS formats to control display precision.&amp;nbsp; &lt;A href="https://blogs.sas.com/content/sasdummy/2007/11/20/lengths-and-formats-the-long-and-short-of-it/" target="_self"&gt;Read this article about the difference between length and format in SAS&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 12:35:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/CONVERT-SQL-SERVER-CODE-TO-SAS/m-p/499465#M154</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-09-27T12:35:53Z</dc:date>
    </item>
  </channel>
</rss>

