<?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: reference a table of a lib inside a &amp;quot;teradata connection&amp;quot; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/reference-a-table-of-a-lib-inside-a-quot-teradata-connection/m-p/785849#M250849</link>
    <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;The auxiliar table has more than 65534 characters.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;ERROR: The length of the value of the macro variable ID_LIST (65540) exceeds the maximum length (65534). The value has been truncated to 65534 characters.&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;How would it be&amp;nbsp;"&lt;SPAN&gt;dynamic macro"?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Dec 2021 18:57:31 GMT</pubDate>
    <dc:creator>arcastro</dc:creator>
    <dc:date>2021-12-13T18:57:31Z</dc:date>
    <item>
      <title>reference a table of a lib inside a "teradata connection"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/reference-a-table-of-a-lib-inside-a-quot-teradata-connection/m-p/785214#M250577</link>
      <description>&lt;P&gt;how to reference a lib table while inside a teradata connection?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 17:36:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/reference-a-table-of-a-lib-inside-a-quot-teradata-connection/m-p/785214#M250577</guid>
      <dc:creator>arcastro</dc:creator>
      <dc:date>2021-12-09T17:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: reference a table of a lib inside a "teradata connection"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/reference-a-table-of-a-lib-inside-a-quot-teradata-connection/m-p/785220#M250579</link>
      <description>Are you using Explicit pass through?&lt;BR /&gt;In that case you're pushing SQL directly to your server and your server cannot see your SAS data sets but there are workarounds if you explain more what you're trying to do.&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Dec 2021 17:55:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/reference-a-table-of-a-lib-inside-a-quot-teradata-connection/m-p/785220#M250579</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-12-09T17:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: reference a table of a lib inside a "teradata connection"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/reference-a-table-of-a-lib-inside-a-quot-teradata-connection/m-p/785745#M250795</link>
      <description>&lt;P&gt;Thanks for your reply!&lt;/P&gt;&lt;P&gt;I am using this method to connect Teradata:&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;"PROC SQL;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;CONNECT TO TERADATA(SERVER='xxxx' SCHEMA='VWDW' USER="xxxx" PASSWORD="xxxx" MODE=TERADATA);"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to see some table in my work/lib in SAS and make filters using my own table inside the SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2021 13:02:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/reference-a-table-of-a-lib-inside-a-quot-teradata-connection/m-p/785745#M250795</guid>
      <dc:creator>arcastro</dc:creator>
      <dc:date>2021-12-13T13:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: reference a table of a lib inside a "teradata connection"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/reference-a-table-of-a-lib-inside-a-quot-teradata-connection/m-p/785748#M250798</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/409421"&gt;@arcastro&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks for your reply!&lt;/P&gt;
&lt;P&gt;I am using this method to connect Teradata:&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;"PROC SQL;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;CONNECT TO TERADATA(SERVER='xxxx' SCHEMA='VWDW' USER="xxxx" PASSWORD="xxxx" MODE=TERADATA);"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to see some table in my work/lib in SAS and make filters using my own table inside the SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It is still hard to tell what you want to do.&amp;nbsp; You can clarify by describing a simple example.&amp;nbsp; Show what tables you have, clearly indicating which are in Teradata and which are not, and then describe the query you need to execute using those tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that you should be able to create volatile tables inside your Teradata database that will live for the duration of your Teradata session.&amp;nbsp; Similar to WORK datasets in SAS.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2021 13:23:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/reference-a-table-of-a-lib-inside-a-quot-teradata-connection/m-p/785748#M250798</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-12-13T13:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: reference a table of a lib inside a "teradata connection"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/reference-a-table-of-a-lib-inside-a-quot-teradata-connection/m-p/785779#M250813</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/409421"&gt;@arcastro&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks for your reply!&lt;/P&gt;
&lt;P&gt;I am using this method to connect Teradata:&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;"PROC SQL;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;CONNECT TO TERADATA(SERVER='xxxx' SCHEMA='VWDW' USER="xxxx" PASSWORD="xxxx" MODE=TERADATA);"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to see some table in my work/lib in SAS and make filters using my own table inside the SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Most likely yes, but exactly how depends on the query.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2021 16:09:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/reference-a-table-of-a-lib-inside-a-quot-teradata-connection/m-p/785779#M250813</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-12-13T16:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: reference a table of a lib inside a "teradata connection"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/reference-a-table-of-a-lib-inside-a-quot-teradata-connection/m-p/785797#M250824</link>
      <description>&lt;P&gt;Thanks again!&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can see a simple example below.&lt;/P&gt;&lt;P&gt;I am connecting in a Teradata Server, and I want to make a join with a table that is outside of this connection, like a Lib or Work. I just wanna make a filter using auxiliar table in my teradata query. This auxlliar tabela could be temporarily, no problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;LIBNAME R_PNL '/sasusers/workgroup/PNL';&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;PROC SQL;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;CONNECT TO TERADATA(SERVER='xxx' SCHEMA='VWDW' USER="xxxxx" PASSWORD="xxxx" MODE=TERADATA);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;CREATE TABLE Test AS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;SELECT * FROM CONNECTION TO TERADATA&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;(Select *&amp;nbsp;&lt;/FONT&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;FROM VWDW.VDW_TERA AS X&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;INNER JOIN R_PNL.COSTUMERS AS Y ON Y.ID = X.ID&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;DISCONNECT FROM TERADATA;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;QUIT;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2021 16:52:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/reference-a-table-of-a-lib-inside-a-quot-teradata-connection/m-p/785797#M250824</guid>
      <dc:creator>arcastro</dc:creator>
      <dc:date>2021-12-13T16:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: reference a table of a lib inside a "teradata connection"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/reference-a-table-of-a-lib-inside-a-quot-teradata-connection/m-p/785808#M250830</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LIBNAME R_PNL '/sasusers/workgroup/PNL';

proc sql noprint;
select distinct iD into :id_list separated by ", "
from r_pnl.costumers;
quit;


PROC SQL;
CONNECT TO TERADATA(SERVER='xxx' SCHEMA='VWDW' USER="xxxxx" PASSWORD="xxxx" MODE=TERADATA);
CREATE TABLE Test AS
SELECT * FROM CONNECTION TO TERADATA
(Select * FROM VWDW.VDW_TERA AS X
INNER JOIN R_PNL.COSTUMERS AS Y ON Y.ID  in (&amp;amp;id_list)
);
DISCONNECT FROM TERADATA;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here's one way if the list of ID's is manageable (macro variables have a limit of 64k characters)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it gets too big you can create a dynamic macro to generate the list instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2021 17:29:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/reference-a-table-of-a-lib-inside-a-quot-teradata-connection/m-p/785808#M250830</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-12-13T17:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: reference a table of a lib inside a "teradata connection"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/reference-a-table-of-a-lib-inside-a-quot-teradata-connection/m-p/785849#M250849</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;The auxiliar table has more than 65534 characters.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;ERROR: The length of the value of the macro variable ID_LIST (65540) exceeds the maximum length (65534). The value has been truncated to 65534 characters.&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;How would it be&amp;nbsp;"&lt;SPAN&gt;dynamic macro"?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2021 18:57:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/reference-a-table-of-a-lib-inside-a-quot-teradata-connection/m-p/785849#M250849</guid>
      <dc:creator>arcastro</dc:creator>
      <dc:date>2021-12-13T18:57:31Z</dc:date>
    </item>
  </channel>
</rss>

