<?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 Merging tables where primary keys are BIGINT Data types in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Merging-tables-where-primary-keys-are-BIGINT-Data-types/m-p/26244#M4666</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Forgot about the possible issues with percision.&amp;nbsp; Thanks OP for the expanded explaination of your issue.&amp;nbsp; You could consider using stored SAS/ACCESS views to keep your pass-through query and allow you to more ealisy access the table elsewhere.&amp;nbsp; Here is an example;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;libname&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; myviews &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;'/temp/sas/view'&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;create&lt;/SPAN&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;view&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; myviews.view1 &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;as&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; cast(id &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;char&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;20&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;)),foo,bar&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; mssql.table1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;using&lt;/SPAN&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;libname&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; mssql sqlsvr&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nopromt=&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;"uid=someone; pwd=somepass; dsn=sqlservr;"&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;You may still want to consider looking at the dbsastype option as a solution, I do not have experience using it for this type of issue however it may be what you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;STRONG style=": ; Courier New&amp;amp;quot: ; color: navy; font-size: 10pt; background: white; font-family: &amp;amp;quot;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: &amp;amp;quot;Courier New&amp;amp;quot;; background: white; color: black; font-size: 10pt;"&gt; foo;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style=": ; Courier New&amp;amp;quot: ; color: black; background: white; font-size: 10pt; mso-spacerun: yes; font-family: &amp;amp;quot;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: &amp;amp;quot;Courier New&amp;amp;quot;; background: white; color: blue; font-size: 10pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: &amp;amp;quot;Courier New&amp;amp;quot;; background: white; color: black; font-size: 10pt;"&gt; sqlservr.table1(dbsastype=(id=char(&lt;/SPAN&gt;&lt;STRONG style=": ; Courier New&amp;amp;quot: ; color: teal; font-size: 10pt; background: white; font-family: &amp;amp;quot;"&gt;20&lt;/STRONG&gt;&lt;SPAN style="font-family: &amp;amp;quot;Courier New&amp;amp;quot;; background: white; color: black; font-size: 10pt;"&gt;)));&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;STRONG style=": ; line-height: 115%; Courier New&amp;amp;quot: ; color: navy; font-size: 10pt; background: white; font-family: &amp;amp;quot;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="line-height: 115%; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jan 2012 15:10:44 GMT</pubDate>
    <dc:creator>FriedEgg</dc:creator>
    <dc:date>2012-01-10T15:10:44Z</dc:date>
    <item>
      <title>Merging tables where primary keys are BIGINT Data types</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-tables-where-primary-keys-are-BIGINT-Data-types/m-p/26240#M4662</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'm using SAS EG 4.3, and I'm trying to find a way of coercing BIGINT variables to either read correctly or be read as text, when being read from the SQL Server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only solution I've been able to find so far is to use a pass-through query and cast the variable into an appropriate format. However since the variables of interest are primary keys in multiple tables this becomes quite annoying always having to execute a pass through query first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone has any ideas, or could point me in the right direction I would be most grateful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 04:14:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-tables-where-primary-keys-are-BIGINT-Data-types/m-p/26240#M4662</guid>
      <dc:creator>jp</dc:creator>
      <dc:date>2012-01-09T04:14:01Z</dc:date>
    </item>
    <item>
      <title>Merging tables where primary keys are BIGINT Data types</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-tables-where-primary-keys-are-BIGINT-Data-types/m-p/26241#M4663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using SAS/ACCESS for Microsoft SQL Server I am not sure why you would have an issue with BIGINT data type.&amp;nbsp; In SQL Server SQL_BIGINT represents a integer value from -2^63 to 2^63.&amp;nbsp; SAS will read these columns as format '20.' which should fit the smallest and largest possible number without issue.&amp;nbsp; When moving data from SAS to SQL Server I believe the fomat used is SQL_DOUBLE or SQL_NUMERIC, the difference I suppose may cause confusion in the database.&amp;nbsp; You can try using the option dbtype in SAS to cast the variable to SQL_BIGINT type.&amp;nbsp; If you would give more information about the specifics of your issue maybe someone can be of more help.&amp;nbsp; If you are using SAS/ACCESS Interface to ODBC the issue may be different.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 15:29:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-tables-where-primary-keys-are-BIGINT-Data-types/m-p/26241#M4663</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2012-01-09T15:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Merging tables where primary keys are BIGINT Data types</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-tables-where-primary-keys-are-BIGINT-Data-types/m-p/26242#M4664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using SAS to connect to a SQL Server, using what I belive is "SQLOLEDB".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use SAS to read tables from the datawarehouse I end up with keys that become duplicated when in fact they should be unique. This as far as I can figure is because SAS is having trouble reading the BIGINT Datatype.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Running the query in SAS I obtain the following keys back as a result:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5111000018684101632&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5111000018684101632&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5111000018684101632&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5111000018684101632&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;+ 16 other &lt;STRONG&gt;identical &lt;/STRONG&gt;rows....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;If I don't coerce the keys to format 20. (using format=20. in the SQL procedure) the keys above display in the following way:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5.111E18&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5.111E18&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5.111E18&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5.111E18&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5.111E18&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;+ 16 other &lt;STRONG&gt;identical &lt;/STRONG&gt;rows....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;When I perform a pass-through query in SAS casting the key as char(20) I get the following output:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5111000018684101752&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5111000018684101760&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5111000018684101762&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5111000018684101759&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5111000018684101763&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;+ 16 other &lt;STRONG style="text-decoration: underline;"&gt;different&lt;/STRONG&gt; rows....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;When I run the query in SQL Server Management Studio:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5111000018684101752&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5111000018684101760&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5111000018684101762&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5111000018684101759&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;5111000018684101763&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;+ 16 other &lt;STRONG style="text-decoration: underline;"&gt;different&lt;/STRONG&gt; rows....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Hope this somewhat clarifies my original post.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Jason&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 01:28:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-tables-where-primary-keys-are-BIGINT-Data-types/m-p/26242#M4664</guid>
      <dc:creator>jp</dc:creator>
      <dc:date>2012-01-10T01:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Merging tables where primary keys are BIGINT Data types</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-tables-where-primary-keys-are-BIGINT-Data-types/m-p/26243#M4665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dependent on the OS the SAS Server is running on a SQL BIGINT column can hold a larger number with full precision than a SAS numeric variable can.&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a000695157.htm"&gt;http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a000695157.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even when not using pass-through SQL (but SAS SQL) the SAS/Access engine will try to send as much of the SQL query to the DBMS as possible. So joining 2 DB tables using SQL (even SAS SQL) will return the correct number of rows as long as processing happens on side of the DB. Look up option "sastrace" which allows you to get logging info of what has been sent to the DB for execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you get the result back from the DB and the result is stored in a SAS table then you will loose full precision for this "bigint keys". That's the reason for these duplicate keys.&lt;/P&gt;&lt;P&gt;The only way I can think of to keep the original key value is conversion to a character. Not sure if you could simply do this as a calculated field (eg. by using the EG wizard and a put expression) - but you could give it a try and by using "sastrace" check where the numeric to character conversion happens.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 02:53:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-tables-where-primary-keys-are-BIGINT-Data-types/m-p/26243#M4665</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-01-10T02:53:47Z</dc:date>
    </item>
    <item>
      <title>Merging tables where primary keys are BIGINT Data types</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-tables-where-primary-keys-are-BIGINT-Data-types/m-p/26244#M4666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Forgot about the possible issues with percision.&amp;nbsp; Thanks OP for the expanded explaination of your issue.&amp;nbsp; You could consider using stored SAS/ACCESS views to keep your pass-through query and allow you to more ealisy access the table elsewhere.&amp;nbsp; Here is an example;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;libname&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; myviews &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;'/temp/sas/view'&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;create&lt;/SPAN&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;view&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; myviews.view1 &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;as&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; cast(id &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;char&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;20&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;)),foo,bar&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; mssql.table1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;using&lt;/SPAN&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;libname&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; mssql sqlsvr&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nopromt=&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;"uid=someone; pwd=somepass; dsn=sqlservr;"&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;You may still want to consider looking at the dbsastype option as a solution, I do not have experience using it for this type of issue however it may be what you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;STRONG style=": ; Courier New&amp;amp;quot: ; color: navy; font-size: 10pt; background: white; font-family: &amp;amp;quot;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: &amp;amp;quot;Courier New&amp;amp;quot;; background: white; color: black; font-size: 10pt;"&gt; foo;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style=": ; Courier New&amp;amp;quot: ; color: black; background: white; font-size: 10pt; mso-spacerun: yes; font-family: &amp;amp;quot;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: &amp;amp;quot;Courier New&amp;amp;quot;; background: white; color: blue; font-size: 10pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: &amp;amp;quot;Courier New&amp;amp;quot;; background: white; color: black; font-size: 10pt;"&gt; sqlservr.table1(dbsastype=(id=char(&lt;/SPAN&gt;&lt;STRONG style=": ; Courier New&amp;amp;quot: ; color: teal; font-size: 10pt; background: white; font-family: &amp;amp;quot;"&gt;20&lt;/STRONG&gt;&lt;SPAN style="font-family: &amp;amp;quot;Courier New&amp;amp;quot;; background: white; color: black; font-size: 10pt;"&gt;)));&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;STRONG style=": ; line-height: 115%; Courier New&amp;amp;quot: ; color: navy; font-size: 10pt; background: white; font-family: &amp;amp;quot;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="line-height: 115%; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 15:10:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-tables-where-primary-keys-are-BIGINT-Data-types/m-p/26244#M4666</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2012-01-10T15:10:44Z</dc:date>
    </item>
    <item>
      <title>Merging tables where primary keys are BIGINT Data types</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-tables-where-primary-keys-are-BIGINT-Data-types/m-p/26245#M4667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Cheers for the help on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My solution based off the above thinking was to use multiple pass through queries to create a library of views and then call these views rather than the original datawarehouse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While I have a bit of work porting the DW tables into views, this actually helps me solve another problem that has been troubling me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Merci!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2012 03:40:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-tables-where-primary-keys-are-BIGINT-Data-types/m-p/26245#M4667</guid>
      <dc:creator>jp</dc:creator>
      <dc:date>2012-01-11T03:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Merging tables where primary keys are BIGINT Data types</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-tables-where-primary-keys-are-BIGINT-Data-types/m-p/26246#M4668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The reason why I didn't propose to create SAS views are:&lt;/P&gt;&lt;P&gt;- Joining 2 SAS views results in all data pulled from the SQL Server into SAS for joining&lt;/P&gt;&lt;P&gt;- Existing indexes which might exist on the original SQL tables will not be used for the join using SAS SQL views&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you really want to create these SAS views then I would suggest that you use dictionary.columns to dynamically create the code for these views.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2012 04:46:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-tables-where-primary-keys-are-BIGINT-Data-types/m-p/26246#M4668</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-01-11T04:46:54Z</dc:date>
    </item>
    <item>
      <title>Merging tables where primary keys are BIGINT Data types</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-tables-where-primary-keys-are-BIGINT-Data-types/m-p/26247#M4669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Patrick once again points out some very key points to consider.&amp;nbsp; These views are optimally used for ETL other than joins.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2012 15:03:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-tables-where-primary-keys-are-BIGINT-Data-types/m-p/26247#M4669</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2012-01-11T15:03:16Z</dc:date>
    </item>
  </channel>
</rss>

