<?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 Teradata Passthrough Help in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Teradata-Passthrough-Help/m-p/961441#M45860</link>
    <description>&lt;P&gt;I have access to the EDW database GRP_A (that I am trying to access via SAS)&lt;/P&gt;
&lt;P&gt;not sure how can I find the libref for GRP_A....also what would the SERVER, mode=teradata(i guess), DATABASE be?&lt;/P&gt;
&lt;P&gt;I do not see the database under the list of Libraries (under Servers under my user)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;CONNECT TO TERADATA(USER="new_Sas_user_4" PASSWORD="xxxx" SERVER="???" mode=teradata DATABASE="???");&lt;BR /&gt;create table base as select * from connection to teradata(&lt;BR /&gt;select BRAND,&lt;BR /&gt;PLAN,&lt;BR /&gt;count(*) as count&lt;BR /&gt;from GRP_A.table_name&lt;BR /&gt;where plan in ('ontario')&lt;BR /&gt;group by 1,2;&lt;BR /&gt;disconnect from teradata;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Mar 2025 15:36:20 GMT</pubDate>
    <dc:creator>new_sas_user_4</dc:creator>
    <dc:date>2025-03-10T15:36:20Z</dc:date>
    <item>
      <title>Teradata Passthrough Help</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Teradata-Passthrough-Help/m-p/961441#M45860</link>
      <description>&lt;P&gt;I have access to the EDW database GRP_A (that I am trying to access via SAS)&lt;/P&gt;
&lt;P&gt;not sure how can I find the libref for GRP_A....also what would the SERVER, mode=teradata(i guess), DATABASE be?&lt;/P&gt;
&lt;P&gt;I do not see the database under the list of Libraries (under Servers under my user)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;CONNECT TO TERADATA(USER="new_Sas_user_4" PASSWORD="xxxx" SERVER="???" mode=teradata DATABASE="???");&lt;BR /&gt;create table base as select * from connection to teradata(&lt;BR /&gt;select BRAND,&lt;BR /&gt;PLAN,&lt;BR /&gt;count(*) as count&lt;BR /&gt;from GRP_A.table_name&lt;BR /&gt;where plan in ('ontario')&lt;BR /&gt;group by 1,2;&lt;BR /&gt;disconnect from teradata;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 15:36:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Teradata-Passthrough-Help/m-p/961441#M45860</guid>
      <dc:creator>new_sas_user_4</dc:creator>
      <dc:date>2025-03-10T15:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Teradata Passthrough Help</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Teradata-Passthrough-Help/m-p/961451#M45861</link>
      <description>&lt;P&gt;I don't quite follow what your setup is.&lt;/P&gt;
&lt;P&gt;But if you have an existing SAS libref named GRP_A that is using the TERADATA engine to connection to a teradata database/schema&amp;nbsp; you should be able to see the schema name in the view&amp;nbsp;SASHELP.VLIBNAM.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use this macro to help you get what schema it is using into a macro variable so that you can use that name in your explicit passthru SQL.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/sasutils/macros/blob/master/dblibchk.sas" target="_blank" rel="noopener"&gt;https://github.com/sasutils/macros/blob/master/dblibchk.sas&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 16:30:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Teradata-Passthrough-Help/m-p/961451#M45861</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-03-10T16:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Teradata Passthrough Help</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Teradata-Passthrough-Help/m-p/961547#M45862</link>
      <description>&lt;P&gt;I was able to use the Teradata Passthough using Teradata sytax within the passthrough code.&lt;/P&gt;
&lt;P&gt;The error was because I was using today()-1 (SAS syntax) within the passthrough...when I changed into current_Date-1...it worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;PROC SQL;&lt;BR /&gt;CONNECT TO TERADATA(USER="new_sas_user_4" PASSWORD="xxxx" );&lt;BR /&gt;create table base as select * from connection to teradata(&lt;BR /&gt;select a,b,c&lt;BR /&gt;count(*) as count&lt;BR /&gt;from GRP_A.table_name&lt;BR /&gt;where current_date-1 between date1 and date2 and prov in ('Ontario')&lt;BR /&gt;group by 1,2,3);&lt;BR /&gt;disconnect from teradata;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 13:50:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Teradata-Passthrough-Help/m-p/961547#M45862</guid>
      <dc:creator>new_sas_user_4</dc:creator>
      <dc:date>2025-03-11T13:50:58Z</dc:date>
    </item>
  </channel>
</rss>

