<?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: Numeric field from sql server to SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Numeric-field-from-sql-server-to-SAS/m-p/147985#M297566</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you suggest, casting the id as a character variable, is a good solution and I have worked with Oracle databases where a 23 digit id was referenced in SAS as a character variable.&amp;nbsp; You may have to create a view in SQL server to recast the id variable.&amp;nbsp; You should do this anyway because even if your summary is done on the server, the result returned to SAS may have non-distinct ids as a result of the 'rounding' during the access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Mar 2014 23:42:17 GMT</pubDate>
    <dc:creator>RichardinOz</dc:creator>
    <dc:date>2014-03-18T23:42:17Z</dc:date>
    <item>
      <title>Numeric field from sql server to SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-field-from-sql-server-to-SAS/m-p/147982#M297563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having problem while processing a field ID in SAS.&amp;nbsp; This is a numeric field contains 27 digits in Sql server 2008. When I run query in SAS accessing this table through&lt;/P&gt;&lt;P&gt; odbc I am getting correct numbers. But when create a dataset in SAS like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set schema.have;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting different counts as a result of same query. Any suggestions for this one please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 19:56:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-field-from-sql-server-to-SAS/m-p/147982#M297563</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-03-18T19:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric field from sql server to SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-field-from-sql-server-to-SAS/m-p/147983#M297564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS numbers &lt;EM&gt;only&lt;/EM&gt; have 14 to 15 significant digits. The last 12 digits of your IDs are ignored. Try this test:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data _null_;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;x1 = 123456789012345678901;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;x2 = 123456789012345678902;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if x1=x2 then put "Same"; else put "Not same";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&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, 18 Mar 2014 20:09:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-field-from-sql-server-to-SAS/m-p/147983#M297564</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-03-18T20:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric field from sql server to SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-field-from-sql-server-to-SAS/m-p/147984#M297565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi PG,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for looking into it. I've tried provided syntax and getting "same" as a result. When SAS processes ID within sql server using odbc I don't have any issue because sql server can accomodate data upto 38 digits for numeric fields.&amp;nbsp; Is there any possibility to process the same within SAS please? Like can I identify this field as a character variable while connecting to sql server?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Naeem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 20:33:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-field-from-sql-server-to-SAS/m-p/147984#M297565</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-03-18T20:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric field from sql server to SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-field-from-sql-server-to-SAS/m-p/147985#M297566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you suggest, casting the id as a character variable, is a good solution and I have worked with Oracle databases where a 23 digit id was referenced in SAS as a character variable.&amp;nbsp; You may have to create a view in SQL server to recast the id variable.&amp;nbsp; You should do this anyway because even if your summary is done on the server, the result returned to SAS may have non-distinct ids as a result of the 'rounding' during the access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 23:42:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-field-from-sql-server-to-SAS/m-p/147985#M297566</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-03-18T23:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric field from sql server to SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-field-from-sql-server-to-SAS/m-p/147986#M297567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Richard and PG for your valuable input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Naeem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2014 13:05:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-field-from-sql-server-to-SAS/m-p/147986#M297567</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-03-19T13:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric field from sql server to SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-field-from-sql-server-to-SAS/m-p/147987#M297568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DBType / DBSASTYpe are the settings for your needed conversion. Part of SAS/ACCESS &lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#n0h4i25zq3t58en1lgr8jjx1rads.htm" title="http://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#n0h4i25zq3t58en1lgr8jjx1rads.htm"&gt;SAS/ACCESS(R) 9.3 for Relational Databases: Reference, Second Edition&lt;/A&gt; (sql server types) and &lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#n0v4ma1zb9lu99n1728j279rjcqi.htm" title="http://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#n0v4ma1zb9lu99n1728j279rjcqi.htm"&gt;SAS/ACCESS(R) 9.3 for Relational Databases: Reference, Second Edition&lt;/A&gt; (DBsastype)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have proc DS2 (9.4 production, 9.3 latest version experimental) the DBMS types are supported. &lt;BR /&gt;You just need to learn that language, some similarties to SCL-language..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2014 21:09:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-field-from-sql-server-to-SAS/m-p/147987#M297568</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-03-19T21:09:22Z</dc:date>
    </item>
  </channel>
</rss>

