<?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 Define SAS variable as Integer in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Define-SAS-variable-as-Integer/m-p/178375#M3579</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I must upload data to a SQL server and created the table which contains the column definition and which is to be updated like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Libname stage ODBC Schema=ODBC DSN=sqlstage;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc SQL;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Create Table stage.Blend_xx&amp;nbsp; (Scenario Char (4), Date Date, &lt;SPAN style="color: #0000ff;"&gt;Alternative Integer&lt;/SPAN&gt;, etc.);&lt;/P&gt;&lt;P&gt;Quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I right that it is no use to define Alternative's length in SAS and that I simply leave the integer-conversion to the access-interface?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;kind regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Jan 2015 12:32:02 GMT</pubDate>
    <dc:creator>user24feb</dc:creator>
    <dc:date>2015-01-12T12:32:02Z</dc:date>
    <item>
      <title>Define SAS variable as Integer</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Define-SAS-variable-as-Integer/m-p/178375#M3579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I must upload data to a SQL server and created the table which contains the column definition and which is to be updated like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Libname stage ODBC Schema=ODBC DSN=sqlstage;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc SQL;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Create Table stage.Blend_xx&amp;nbsp; (Scenario Char (4), Date Date, &lt;SPAN style="color: #0000ff;"&gt;Alternative Integer&lt;/SPAN&gt;, etc.);&lt;/P&gt;&lt;P&gt;Quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I right that it is no use to define Alternative's length in SAS and that I simply leave the integer-conversion to the access-interface?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;kind regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2015 12:32:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Define-SAS-variable-as-Integer/m-p/178375#M3579</guid>
      <dc:creator>user24feb</dc:creator>
      <dc:date>2015-01-12T12:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Define SAS variable as Integer</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Define-SAS-variable-as-Integer/m-p/178376#M3580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, I think you need to specify the data type for integers at least, I think the default data type for SAS numrical columns is NUMERIC.&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/67589/HTML/default/n13gtugcxgdqstn1pooivt622n4q.htm" title="http://support.sas.com/documentation/cdl/en/acreldb/67589/HTML/default/n13gtugcxgdqstn1pooivt622n4q.htm"&gt;Data Types for ODBC :: SAS/ACCESS(R) 9.4 for Relational Databases: Reference, Sixth Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Use the DBTYPE= ds option do override the default conversion.&lt;/P&gt;&lt;P&gt;Or create your table using explicit SQL pass-thru.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2015 13:39:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Define-SAS-variable-as-Integer/m-p/178376#M3580</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-01-12T13:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Define SAS variable as Integer</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Define-SAS-variable-as-Integer/m-p/178377#M3581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works. Thanks!! (Would unmark your answer as helful and set it to right answer, but the homepage for some reasen doesn't let me. sorry.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data A;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Input Name $4. Number @@;&lt;BR /&gt;&amp;nbsp; Datalines;&lt;BR /&gt;AAAA 1 BBBB 3 CCCC 7 DDDD 9 EEEE 6&lt;BR /&gt;;&lt;BR /&gt;Proc SQL;&lt;BR /&gt;&amp;nbsp; Create Table stage.Int_Test &lt;SPAN style="color: #339966;"&gt;(DBType=(Number=Integer))&lt;/SPAN&gt; ( Name Char(4), Number Integer ) ; * this is to define the data types;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Insert Into stage.Int_Test Select Name, Number As SQL_Integer From A; * this is the actual update;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Connect to ODBC (DSN=sqlstage); * this is to check which data types are actually assigned;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create Table Int_Test_Info As Select * From Connection to ODBC (ODBC::SQLColumns (, , "INT_TEST" ));&lt;BR /&gt;&amp;nbsp; Disconnect From ODBC;&lt;BR /&gt;Quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2015 15:51:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Define-SAS-variable-as-Integer/m-p/178377#M3581</guid>
      <dc:creator>user24feb</dc:creator>
      <dc:date>2015-01-12T15:51:47Z</dc:date>
    </item>
  </channel>
</rss>

