<?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: SAS/Access to Teradata --How to create Temporary tables in Teradata in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228881#M16671</link>
    <description>&lt;P&gt;Well, you might have access, but does your EG install. &amp;nbsp;I would check that. &amp;nbsp;As for my post, what was the syntax error?&lt;/P&gt;</description>
    <pubDate>Wed, 07 Oct 2015 13:55:02 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2015-10-07T13:55:02Z</dc:date>
    <item>
      <title>SAS/Access to Teradata --How to create Temporary tables in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228852#M16665</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to create a temporary table in teradata but coulnd't succeed.&lt;/P&gt;&lt;P&gt;I want to create a temporary table in teradata for the result of the proc sql query in SAS EG.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc sql;&lt;BR /&gt;connect to teradata(user=user password=password server=servername database=databasename);&lt;BR /&gt;create table test_1 as&lt;BR /&gt;select * from connection to teradata&lt;BR /&gt;(select Cust.UNIQUE_ID,IP.IP_NAME&lt;BR /&gt;from temIP as IP&lt;BR /&gt;inner join temCUST as Cust&lt;BR /&gt;on IP.IP_ID = Cust.CUST_ID);&lt;BR /&gt;disconnect from teradata;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the above example i created a sas dataset test_1 which holds the results of the sql query.&lt;BR /&gt;Instead of sas dataset I want to create a temporary table in teradata and use the same in other sql queries.&lt;BR /&gt;how can I create it?&lt;BR /&gt;Your suggestions would be of great help.Thank You.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 12:44:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228852#M16665</guid>
      <dc:creator>Tornal</dc:creator>
      <dc:date>2015-10-07T12:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/Access to Teradata --How to create Temporary tables in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228857#M16666</link>
      <description>&lt;P&gt;Well, several things. &amp;nbsp;Firstly good code formatting helps readability. &amp;nbsp;Secondly, you would be better off doing database tasks on the data rather than from here. &amp;nbsp;However if your really stuck on this:&lt;/P&gt;
&lt;PRE&gt;proc sql;
  connect to XYX (....);
  execute by XYZ (create table SCHEMA.TABLE as select * from WORK.TMP);
  disconnect from XYZ;
quit;&lt;/PRE&gt;
&lt;P&gt;Note, schema and table need changing to your setup.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 12:52:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228857#M16666</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-10-07T12:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/Access to Teradata --How to create Temporary tables in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228858#M16667</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before getting into technical details, let me just ask: Do you have 'write' permission to Teradata database? If yes, then it shouldn't be a problem. If not, maybe a view will work for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 12:53:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228858#M16667</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-10-07T12:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/Access to Teradata --How to create Temporary tables in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228862#M16668</link>
      <description>&lt;P&gt;We use to connect to teradata by creating ODBC connection. You can try in that way.&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;CONNECT TO ODBC (USER=&amp;amp;USR PASSWORD=&amp;amp;PWRD DSN=&amp;lt;&amp;lt;Data Base&amp;gt;&amp;gt;);&lt;BR /&gt;CREATE TABLE&amp;nbsp;Status&lt;BR /&gt;AS&lt;BR /&gt;Select * from connection to odbc&lt;BR /&gt;(SELECT&lt;BR /&gt;DISTINCT Aa AS&amp;nbsp;A1&lt;BR /&gt;,A1AS&amp;nbsp;A1&lt;BR /&gt;FROM A AS A1&lt;BR /&gt;);&lt;BR /&gt;Disconnect from odbc;&lt;BR /&gt;QUIT;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to create odbc&lt;/P&gt;&lt;P&gt;Start&amp;gt;tye"ODBC (Select obbc32)&amp;gt; Add&amp;gt; teradata&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps your problem. :):)&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 12:57:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228862#M16668</guid>
      <dc:creator>SJN</dc:creator>
      <dc:date>2015-10-07T12:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/Access to Teradata --How to create Temporary tables in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228865#M16669</link>
      <description>&lt;P&gt;Yes I do have "write" permission to teradata database.I tried to create a table directly in Teradata SQL Assistant it worked.But When I am trying to do the same from SAS EG it's not working.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 13:08:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228865#M16669</guid>
      <dc:creator>Tornal</dc:creator>
      <dc:date>2015-10-07T13:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/Access to Teradata --How to create Temporary tables in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228867#M16670</link>
      <description>&lt;P&gt;Thank you for your response.Sorry I was in a hurry so I din't format it.&lt;/P&gt;&lt;P&gt;I tried to create a table using the format you have mentioned but its giving me syntax error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 13:11:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228867#M16670</guid>
      <dc:creator>Tornal</dc:creator>
      <dc:date>2015-10-07T13:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/Access to Teradata --How to create Temporary tables in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228881#M16671</link>
      <description>&lt;P&gt;Well, you might have access, but does your EG install. &amp;nbsp;I would check that. &amp;nbsp;As for my post, what was the syntax error?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 13:55:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228881#M16671</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-10-07T13:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/Access to Teradata --How to create Temporary tables in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228884#M16672</link>
      <description>&lt;P&gt;Please find the syntax error below.Also I tried to add open and close paranthesis after "as" and select statement but still it gives same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ERROR:&lt;/STRONG&gt; Teradata execute: Syntax error, expected something like a name or a Unicode delimited identifier or '(' between the 'as'&lt;BR /&gt;keyword and the 'select' keyword.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just tried to create a temporary table using the below statement .It runs fine without any error but I don't see the temporary table in teradata.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; connect to XYX (....);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; execute by XYZ (create table temp1 (col1 int)) by teradata;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; disconnect from XYZ;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help me out to solve this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 14:09:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228884#M16672</guid>
      <dc:creator>Tornal</dc:creator>
      <dc:date>2015-10-07T14:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/Access to Teradata --How to create Temporary tables in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228887#M16673</link>
      <description>&lt;P&gt;It should look something like:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc sql;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; connect to terradata (....);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; execute (create table temp1 (col1 int)) by teradata;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; disconnect from terradata;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 14:16:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228887#M16673</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-10-07T14:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/Access to Teradata --How to create Temporary tables in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228894#M16674</link>
      <description>&lt;P&gt;I executed it the same way as mentioned by you.It runs fine without errors but I am not able to see the table in &amp;nbsp;the database &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 14:40:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228894#M16674</guid>
      <dc:creator>Tornal</dc:creator>
      <dc:date>2015-10-07T14:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/Access to Teradata --How to create Temporary tables in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228944#M16679</link>
      <description>&lt;P&gt;In Teradata code you are asking to create a VOLATILE table. &amp;nbsp;If you want them to persist across steps then use CONNECTION=GLOBAL option on your connections and create a LIBREF that stays defined for as long as you want your session to remain the same.&lt;/P&gt;
&lt;P&gt;So one way to use this is create LIBREF that points to Teradata and uses the temporary (spool) space. This will let you see the volatile tables that you have created.&lt;/P&gt;
&lt;P&gt;For example if TEMPIP is a list of id numbers that you want to upload from SAS and then use to merge back with master data in the Teradata Database then your program might look like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname tdwork teradata username=&amp;amp;username password=&amp;amp;password server=&amp;amp;server 
&amp;nbsp; connection=global dbmstemp=yes
;
data tdwork.TEMPIP;
&amp;nbsp; &amp;nbsp;ip_id=1;&lt;BR /&gt;   ip_name='My Name';
run;

proc sql noprint;
&amp;nbsp; &amp;nbsp;connect to teradata (username=&amp;amp;username password=&amp;amp;password server=&amp;amp;server connection=global);
create table test_1 as
select * from connection to teradata
(select Cust.UNIQUE_ID,IP.IP_NAME
from TEMPIP as IP
inner join DATABASE_NAME.MASTER_CUST as Cust
on IP.IP_ID = Cust.CUST_ID
 );
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 17:36:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/228944#M16679</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-10-07T17:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/Access to Teradata --How to create Temporary tables in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/229065#M16685</link>
      <description>&lt;P&gt;Seems like &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom﻿&lt;/a&gt; was the only one that have read the following:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/68028/HTML/default/viewer.htm#p0gu3f7qh8i83jn18af4i1bf2xlp.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acreldb/68028/HTML/default/viewer.htm#p0gu3f7qh8i83jn18af4i1bf2xlp.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 07:37:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/229065#M16685</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-10-08T07:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/Access to Teradata --How to create Temporary tables in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/229148#M16687</link>
      <description>&lt;P&gt;Thanks Tom for very detailed explaination.I am able to create the table and join it back but still i don't see the table in the database &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I verified the &lt;SPAN&gt;existence of the table by running proc print statement.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 15:44:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/229148#M16687</guid>
      <dc:creator>Tornal</dc:creator>
      <dc:date>2015-10-08T15:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/Access to Teradata --How to create Temporary tables in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/229166#M16688</link>
      <description>&lt;P&gt;If you make new connection to Teradata you will have a different spool space and so a different set of temporary tables. &amp;nbsp;If you want SAS to keep using the same connection then you need to use the CONNECTION=GLOBAL option on all connections and be consistent in your settings for username, password, server, mode, database etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 17:41:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/229166#M16688</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-10-08T17:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/Access to Teradata --How to create Temporary tables in Teradata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/229576#M16702</link>
      <description>&lt;P&gt;Tom,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After including the&amp;nbsp;SQL_FUNCTIONS=ALL in my libname statement I was able to view the tables that I was creating in Teradata through SAS. I have read about this option in SAS documents but I am not sure whether it is safe to use this statement or not.&lt;/P&gt;
&lt;P&gt;Kindly provide your inputs on this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 18:29:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-Access-to-Teradata-How-to-create-Temporary-tables-in/m-p/229576#M16702</guid>
      <dc:creator>Tornal</dc:creator>
      <dc:date>2015-10-12T18:29:25Z</dc:date>
    </item>
  </channel>
</rss>

