<?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: importing access data with a long table name in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/importing-access-data-with-a-long-table-name/m-p/619949#M77132</link>
    <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the speedy reply. You were right - I needed to put the table name in square brackets. Now the pass through works!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
connect to access(path="pathway to .mdb"
	dbpwd = "xxxx");
create table work.test as
select * from connection to access
(select * from [verylongtablenameherexxxx xxxxxxxxx]);
disconnect from access;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 24 Jan 2020 23:42:50 GMT</pubDate>
    <dc:creator>robin2</dc:creator>
    <dc:date>2020-01-24T23:42:50Z</dc:date>
    <item>
      <title>importing access data with a long table name</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/importing-access-data-with-a-long-table-name/m-p/619943#M77130</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to import data from a Microsoft Access data table that has a table name longer than 32 characters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import out = work
datatable = "verylongtablenameherexxxx xxxxxxxxx"
dbms = access replace;
dbpwd = "xxxx";
database = "pathway to mdb";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get the following error message: ERROR: TABLE value exceeds maximum length of 32 characters.&lt;/P&gt;&lt;P&gt;Is there a way to get around this? I tried using the SQL pass through (which I have never used before) but that also presents an error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
connect to access(path="pathway to .mdb"
	dbpwd = "xxxx");
create table work.test as
select * from connection to access
(select * from "verylongtablenameherexxxx xxxxxxxxx");
disconnect from access;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;ERROR: Prepare: Syntax error in query. Incomplete query clause.&lt;BR /&gt;SQL statement: select * from "Live Booster Phone calls Information"&lt;/P&gt;&lt;P&gt;Any ideas would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 23:08:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/importing-access-data-with-a-long-table-name/m-p/619943#M77130</guid>
      <dc:creator>robin2</dc:creator>
      <dc:date>2020-01-24T23:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: importing access data with a long table name</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/importing-access-data-with-a-long-table-name/m-p/619945#M77131</link>
      <description>&lt;P&gt;Pass Through should work. I think your query is wrong though you need to use Access SQL and indicate the book and table name? I think it needs to be in braces or there's some way that Access references tables with spaces in them. &lt;BR /&gt;&lt;BR /&gt;This is the part SAS doesn't like right now:&lt;BR /&gt;&lt;BR /&gt;select * from "verylongtablenameherexxxx xxxxxxxxx"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/308861"&gt;@robin2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to import data from a Microsoft Access data table that has a table name longer than 32 characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import out = work
datatable = "verylongtablenameherexxxx xxxxxxxxx"
dbms = access replace;
dbpwd = "xxxx";
database = "pathway to mdb";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I get the following error message: ERROR: TABLE value exceeds maximum length of 32 characters.&lt;/P&gt;
&lt;P&gt;Is there a way to get around this? I tried using the SQL pass through (which I have never used before) but that also presents an error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
connect to access(path="pathway to .mdb"
	dbpwd = "xxxx");
create table work.test as
select * from connection to access
(select * from "verylongtablenameherexxxx xxxxxxxxx");
disconnect from access;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;ERROR: Prepare: Syntax error in query. Incomplete query clause.&lt;BR /&gt;SQL statement: select * from "Live Booster Phone calls Information"&lt;/P&gt;
&lt;P&gt;Any ideas would be greatly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Robin&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 23:13:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/importing-access-data-with-a-long-table-name/m-p/619945#M77131</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-01-24T23:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: importing access data with a long table name</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/importing-access-data-with-a-long-table-name/m-p/619949#M77132</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the speedy reply. You were right - I needed to put the table name in square brackets. Now the pass through works!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
connect to access(path="pathway to .mdb"
	dbpwd = "xxxx");
create table work.test as
select * from connection to access
(select * from [verylongtablenameherexxxx xxxxxxxxx]);
disconnect from access;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Jan 2020 23:42:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/importing-access-data-with-a-long-table-name/m-p/619949#M77132</guid>
      <dc:creator>robin2</dc:creator>
      <dc:date>2020-01-24T23:42:50Z</dc:date>
    </item>
  </channel>
</rss>

