BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Ujjawal
Quartz | Level 8

I want to access volatile teradata table in SAS. I am able to create the volatile table using the following code :

 

proc sql;
 connect to teradata (user="youruserid" password="yourpassword" mode=teradata  server="servername" connection=global);
 execute(
 create volatile table temp as (
 select id
 , region
 , sector
 , income
 from ls_policy_inter
 group by 1,2
 )
 with data primary index (id)
 on commit preserve rows
 ) by teradata;
quit;

So if i need to use the table created in the above code in the subsequent code. I can access only permanent teradata table.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Before you create your volatile table first create a libref using the same connection details, including the CONNECTION=GLOBAL setting, and include the DBMSTEMP=YES option.

libname tdwork teradata user="youruserid" password="yourpassword" 
    mode=teradata  server="servername" 
    connection=global dbmstemp=yes
;

Then from SAS you can view the volatile table your SQL code generated as TDWORK.TEMP.  You will also be able to see the tables from future PROC SQL steps (that use the same connection details). 

 

Leave that libref active for as long as you want to be able to view your volatile tables.

 

 

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

Before you create your volatile table first create a libref using the same connection details, including the CONNECTION=GLOBAL setting, and include the DBMSTEMP=YES option.

libname tdwork teradata user="youruserid" password="yourpassword" 
    mode=teradata  server="servername" 
    connection=global dbmstemp=yes
;

Then from SAS you can view the volatile table your SQL code generated as TDWORK.TEMP.  You will also be able to see the tables from future PROC SQL steps (that use the same connection details). 

 

Leave that libref active for as long as you want to be able to view your volatile tables.

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 11934 views
  • 2 likes
  • 3 in conversation