<?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 SAS accessing large table names on Amazon redshift in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-accessing-large-table-names-on-Amazon-redshift/m-p/255936#M48962</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Has anyone dealt with how to reference tables names larger than 32 characters on redshift through proc sql?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Susan&lt;/P&gt;&lt;P&gt;BASE SAS V9 using ODBC connecting to Amazon redshift via proc sql and a libname statement.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table nutslp as 

select blah
	from prod.member m 
inner join prod.member_activities_by_activitytype ma
	on a.action_type = ma.activitytype 
;
quit;


partial log below:
637  inner join prod.member_activities_by_activitytype ma
                     ---------------------------------
                     65
ERROR 65-58: Name 'MEMBER_ACTIVITIES_BY_ACTIVITYTYPE' is too long for a SAS name in this context.



&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 10 Mar 2016 21:09:03 GMT</pubDate>
    <dc:creator>smartiVP</dc:creator>
    <dc:date>2016-03-10T21:09:03Z</dc:date>
    <item>
      <title>SAS accessing large table names on Amazon redshift</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-accessing-large-table-names-on-Amazon-redshift/m-p/255936#M48962</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Has anyone dealt with how to reference tables names larger than 32 characters on redshift through proc sql?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Susan&lt;/P&gt;&lt;P&gt;BASE SAS V9 using ODBC connecting to Amazon redshift via proc sql and a libname statement.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table nutslp as 

select blah
	from prod.member m 
inner join prod.member_activities_by_activitytype ma
	on a.action_type = ma.activitytype 
;
quit;


partial log below:
637  inner join prod.member_activities_by_activitytype ma
                     ---------------------------------
                     65
ERROR 65-58: Name 'MEMBER_ACTIVITIES_BY_ACTIVITYTYPE' is too long for a SAS name in this context.



&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Mar 2016 21:09:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-accessing-large-table-names-on-Amazon-redshift/m-p/255936#M48962</guid>
      <dc:creator>smartiVP</dc:creator>
      <dc:date>2016-03-10T21:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAS accessing large table names on Amazon redshift</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-accessing-large-table-names-on-Amazon-redshift/m-p/255938#M48963</link>
      <description>The same as any other RDBMS with names &amp;gt;32 chars. Either have views created for you with adjusted names, or use explicit SQL pass thru.</description>
      <pubDate>Thu, 10 Mar 2016 21:15:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-accessing-large-table-names-on-Amazon-redshift/m-p/255938#M48963</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-03-10T21:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAS accessing large table names on Amazon redshift</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-accessing-large-table-names-on-Amazon-redshift/m-p/255946#M48967</link>
      <description>&lt;P&gt;Thanks but the explicit sql pass through did not seem to work. &amp;nbsp;Unless I coded it wrong. &amp;nbsp;I got the same message as before.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
connect to ODBC as myred (datasrc='bbb' user=me password=ppp ); 
create table nutslp as 
select *
from member m 
inner join member_activities_by_activitytype ma
	on m.action_type = ma.activitytype 
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Mar 2016 21:41:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-accessing-large-table-names-on-Amazon-redshift/m-p/255946#M48967</guid>
      <dc:creator>smartiVP</dc:creator>
      <dc:date>2016-03-10T21:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAS accessing large table names on Amazon redshift</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-accessing-large-table-names-on-Amazon-redshift/m-p/255955#M48972</link>
      <description>&lt;P&gt;You've coded it wrong:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
connect to ODBC as myred (datasrc='bbb' user=me password=ppp ); 
create table nutslp as 
select *
from connection to myred
(select *
from member m 
inner join member_activities_by_activitytype ma
	on m.action_type = ma.activitytype 
)
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Mar 2016 22:00:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-accessing-large-table-names-on-Amazon-redshift/m-p/255955#M48972</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-03-10T22:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: SAS accessing large table names on Amazon redshift</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-accessing-large-table-names-on-Amazon-redshift/m-p/255960#M48975</link>
      <description>&lt;P&gt;Thank you SASKiwi, worked like a charm &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 22:12:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-accessing-large-table-names-on-Amazon-redshift/m-p/255960#M48975</guid>
      <dc:creator>smartiVP</dc:creator>
      <dc:date>2016-03-10T22:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS accessing large table names on Amazon redshift</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-accessing-large-table-names-on-Amazon-redshift/m-p/255966#M48979</link>
      <description>&lt;P&gt;Glad to be of service!&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 22:36:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-accessing-large-table-names-on-Amazon-redshift/m-p/255966#M48979</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-03-10T22:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAS accessing large table names on Amazon redshift</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-accessing-large-table-names-on-Amazon-redshift/m-p/307782#M65970</link>
      <description>&lt;P&gt;Hi, I have a similar problem.&lt;/P&gt;
&lt;P&gt;I&amp;nbsp;just moved to a new company where we don't have a scratch DB on the SQl server. To surcumvent this, I used to upload my table with the primary key to the scratch DB; then connect to the DB and execute SQL on the server to join my table; then pull it to my local machine. However, as&amp;nbsp;I mentioned, we don't have a scratch DB here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I&amp;nbsp;tried the above example, but it still gives me an error...i hope you can help:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*example*/&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; tableA (&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;drop&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;= i);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;do&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; i = &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;to&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;10&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;sys_ID = i;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;output&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;end&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;connect&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;to&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; odbc &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;as&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; imaging (dsn=imaging);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;create&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;table&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; tableB &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;as&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;select&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; *&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;from&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; connection to imaging&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; (&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;select&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; *&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;from&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; work.tableA &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;as&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; a&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;left&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;join&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; imaging.dbo.AdviceSheetAdditionalRequirements b&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;on&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; a.sys_ID = b.sys_ID&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;order&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;by&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; a.sys_ID&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;disconnect&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;from&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; odbc;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;The Log window says: &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;ERROR: CLI describe error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name&lt;/P&gt;
&lt;P&gt;'work.tableA'. : [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be&lt;/P&gt;
&lt;P&gt;prepared.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2016 22:36:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-accessing-large-table-names-on-Amazon-redshift/m-p/307782#M65970</guid>
      <dc:creator>GenDemo</dc:creator>
      <dc:date>2016-10-27T22:36:13Z</dc:date>
    </item>
  </channel>
</rss>

