<?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: proc contents in teradata in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-contents-in-teradata/m-p/961619#M45865</link>
    <description>&lt;P&gt;Here is an example for ODBC. But the same thing should be done for TD.&lt;/P&gt;
&lt;P&gt;Also you could try&amp;nbsp;&lt;CODE class=" language-sas"&gt;SQLColumns(,"dbo")&lt;/CODE&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*
https://www.connectionstrings.com/
https://www.connectionstrings.com/microsoft-odbc-driver-13-for-sql-server/
https://communities.sas.com/t5/Administration-and-Deployment/Tables-not-shown-up/m-p/939847#M28853
*/


proc sql;
connect to odbc as MyODBCName (dsn="MyODBCName" user="username" password="password");
select * from connection to MyODBCName (
ODBC::SQLTables(,"dbo")
)
;
disconnect from MyODBCName ;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 12 Mar 2025 02:29:48 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2025-03-12T02:29:48Z</dc:date>
    <item>
      <title>proc contents in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-contents-in-teradata/m-p/961550#M45863</link>
      <description>&lt;P&gt;what is the way to see column names and their type(character or numeric) when using Teradata passthrough.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;PROC SQL;&lt;BR /&gt;CONNECT TO TERADATA(USER="new_sas_user_4" PASSWORD="xxxx" );&lt;BR /&gt;create table a as select * from connection to teradata(&lt;BR /&gt;proc contents data= database_name.table_name&lt;/P&gt;
&lt;P&gt;);&lt;BR /&gt;disconnect from teradata;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;this is not working &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 13:53:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-contents-in-teradata/m-p/961550#M45863</guid>
      <dc:creator>new_sas_user_4</dc:creator>
      <dc:date>2025-03-11T13:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: proc contents in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-contents-in-teradata/m-p/961551#M45864</link>
      <description>&lt;P&gt;That is a question for Teradata forum.&amp;nbsp; All of the code inside the () after the FROM CONNECTION TO xxx needs to be valid syntax for the foreign database.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/49013777/how-to-list-the-columns-of-a-table-in-teradata-sql" target="_blank"&gt;https://stackoverflow.com/questions/49013777/how-to-list-the-columns-of-a-table-in-teradata-sql&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically run a query against the metadata view&amp;nbsp;&lt;/P&gt;
&lt;PRE class="lang-sql s-code-block"&gt;&lt;CODE class="hljs language-sql" data-highlighted="yes"&gt;dbc.columnsV&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 14:00:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-contents-in-teradata/m-p/961551#M45864</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-03-11T14:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: proc contents in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-contents-in-teradata/m-p/961619#M45865</link>
      <description>&lt;P&gt;Here is an example for ODBC. But the same thing should be done for TD.&lt;/P&gt;
&lt;P&gt;Also you could try&amp;nbsp;&lt;CODE class=" language-sas"&gt;SQLColumns(,"dbo")&lt;/CODE&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*
https://www.connectionstrings.com/
https://www.connectionstrings.com/microsoft-odbc-driver-13-for-sql-server/
https://communities.sas.com/t5/Administration-and-Deployment/Tables-not-shown-up/m-p/939847#M28853
*/


proc sql;
connect to odbc as MyODBCName (dsn="MyODBCName" user="username" password="password");
select * from connection to MyODBCName (
ODBC::SQLTables(,"dbo")
)
;
disconnect from MyODBCName ;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Mar 2025 02:29:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-contents-in-teradata/m-p/961619#M45865</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-03-12T02:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: proc contents in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-contents-in-teradata/m-p/961634#M45866</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;what is the way to see column names and their type(character or numeric) when using Teradata passthrough.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Do you want to see the Teradata data types or to what they map on the SAS side?&lt;BR /&gt;If it's just on the SAS side (character or numeric) then use a libname and then Proc Contents.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mytera teradata &amp;lt;connection info&amp;gt;.
proc contents data=mytera.&amp;lt;table name&amp;gt;;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want the actual Teradata data types then using SAS it must be via explicit SQL passthrough using Teradata specific syntax - for which you would need to ask in a Teradata forum.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 06:29:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-contents-in-teradata/m-p/961634#M45866</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2025-03-12T06:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: proc contents in teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-contents-in-teradata/m-p/962384#M45871</link>
      <description>&lt;P&gt;I was able to see a sample of the rows from the teradata table using the below code....explicit passthrough.&lt;/P&gt;
&lt;P&gt;PROC SQL;&lt;BR /&gt;CONNECT TO TERADATA(USER="username" PASSWORD="password" );&lt;BR /&gt;create table A2 as select * from connection to teradata(&lt;BR /&gt;SELECT&lt;BR /&gt;* from terdata_database.table_name sample 10&lt;/P&gt;
&lt;P&gt;);&lt;BR /&gt;disconnect from teradata;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 13:34:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-contents-in-teradata/m-p/962384#M45871</guid>
      <dc:creator>new_sas_user_4</dc:creator>
      <dc:date>2025-03-21T13:34:51Z</dc:date>
    </item>
  </channel>
</rss>

