<?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: SQL Server tables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265243#M310328</link>
    <description>&lt;P&gt;You didn't use the name literal. This is a guess.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Table.name"n&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The other method that will work - for sure - is a SQL Pass Thru query.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Apr 2016 21:38:18 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-04-20T21:38:18Z</dc:date>
    <item>
      <title>SQL Server tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265068#M310322</link>
      <description>&lt;P&gt;How do I read from SQL Server tables with a period embedded in its name? (e.g SQL Server table name of Analytics.New.Phase1) I get an error 22-322 when trying to read it.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2016 12:32:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265068#M310322</guid>
      <dc:creator>mbsuther</dc:creator>
      <dc:date>2016-04-20T12:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265069#M310323</link>
      <description>&lt;P&gt;Try a name literal&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'name.test.work'n&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However if your database is Analytics, schema is New and table is Phase1 then you do that in how you set up your SQL connection.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2016 12:38:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265069#M310323</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-04-20T12:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265131#M310324</link>
      <description>&lt;P&gt;Did not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a code snippet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname LumenDB OLEDB init_string="................" schema=dbo;&lt;/P&gt;&lt;P&gt;%global LUMENTABLE;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;lumentable='ActivityLog.Entry'n;&lt;/P&gt;&lt;P&gt;call SYMPUT("LUMENTABLE",lumentable;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table Lumen1 as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select EntryID, UserID, ServerID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from &amp;amp;LumenDB..&amp;amp;LUMENTABLE;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also tried:&lt;/P&gt;&lt;P&gt;data temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set &amp;amp;LumenDB..'ActivityLog.Entry'n;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neither of these worked. Got the ActivityLog.Entry is not a valid SAS name.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2016 15:32:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265131#M310324</guid>
      <dc:creator>mbsuther</dc:creator>
      <dc:date>2016-04-20T15:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265138#M310325</link>
      <description>&lt;P&gt;Turn on the following option and try posting a proc datasets result for the library.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Options validvarname=any(&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Apr 2016 16:01:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265138#M310325</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-04-20T16:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265239#M310326</link>
      <description>&lt;P&gt;still did not work. Posting the code snippet and errors.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2016 21:16:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265239#M310326</guid>
      <dc:creator>mbsuther</dc:creator>
      <dc:date>2016-04-20T21:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265242#M310327</link>
      <description>&lt;P&gt;You didn't use the name literal. This is a guess.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Table.name"n&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The other method that will work - for sure - is a SQL Pass Thru query.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2016 21:38:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265242#M310327</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-04-20T21:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265243#M310328</link>
      <description>&lt;P&gt;You didn't use the name literal. This is a guess.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Table.name"n&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The other method that will work - for sure - is a SQL Pass Thru query.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2016 21:38:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265243#M310328</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-04-20T21:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265299#M310329</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname x odbc '...' preserve_tab_names=yes preserve_col_names=yes ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Apr 2016 03:08:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265299#M310329</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-04-21T03:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265402#M310330</link>
      <description>&lt;P&gt;I did try 'ActivityLog.Entry'n. It let me assign the value to a variable with no problem. However, I still got the error "table name not recognized" when I used the variable in either a SET or a "Select..." statement.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 12:59:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265402#M310330</guid>
      <dc:creator>mbsuther</dc:creator>
      <dc:date>2016-04-21T12:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265417#M310331</link>
      <description>&lt;P&gt;I am using OLEDB instead of ODBC. However, i tried these option in the init_string, in provider_string, etc. They gave no errors, but I still get the error "ActivityEntry.Entry is an invalid table name......."&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 13:52:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265417#M310331</guid>
      <dc:creator>mbsuther</dc:creator>
      <dc:date>2016-04-21T13:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265568#M310332</link>
      <description>Maybe you should check documentation relating to OLEDB, and find some options like
 preserve_tab_names=yes  preserve_col_names=yes 

Or you could try this system option :
option validmemname=extend ;</description>
      <pubDate>Fri, 22 Apr 2016 01:07:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/265568#M310332</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-04-22T01:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/266330#M310333</link>
      <description>&lt;P&gt;Actually found the issue was not related to how I tried to access the table. The instances actually has two database owners. i put in the correct owner in the "schema'" of the libname and all worked. Thanks for all the suggestions.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2016 11:34:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-Server-tables/m-p/266330#M310333</guid>
      <dc:creator>mbsuther</dc:creator>
      <dc:date>2016-04-26T11:34:58Z</dc:date>
    </item>
  </channel>
</rss>

