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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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