BookmarkSubscribeRSS Feed
Sid
Calcite | Level 5 Sid
Calcite | Level 5
Hi,

I want to create volatile table in teradata using SAS dataset.
I tried varios options but still stuck!
SAS support documentation gives information only about creating Volatile tables and not for creating volatile tables using SAS datasets!

1> Does anyone know how this can be done by Libname? What options do i need to specify?
2> By Pass-thru, I tried this =
proc sql;

CONNECT to teradata(user='XXX' pw='YYY' server=XX connection=global);
execute (CREATE VOLATILE TABLE temp1 (
UNIQUE_ID char(10) NOT NULL
)
ON COMMIT PRESERVE ROWS) by teradata;

quit;

But after this, Insert does not work. Pass Thru Insert requires only Literal values.

I also tried =>

Create volatile table as (select * from sas_dataset)
But this also does not work. I am running SAS on production server (& not on my local machine). So, SAS does not recognize sas_dataset inside CONNECT statement !

I would be very much thankful for suggestions ??!!
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
You may find information at the SAS support website http://support.sas.com/ and do a search on your topic, or as I did, you will find the Google advanced search argument will generate some DOC results found at the SAS site:

create volatile table teradata site:sas.com

Scott Barry
SBBWorks, Inc.
Sid
Calcite | Level 5 Sid
Calcite | Level 5
Thanks a lot!

Proc Append is working absolutely fine!

Apprecite your help.
deleted_user
Not applicable
If you want to setup a volatile table then insert from a SAS table use below.

Please note that the volatile table only reliably lasts for the duration of the entire Proc Sql.

code:

libname trlib clear;
libname trlib teradata user=youruserid password="yourpassword" connection=global;

/* Setup the volatile table with the variables.*/

proc sql;
connect to teradata(User=youruserid password="yourpassword" connection=global);
execute (create volatile table temp1
( first_variable decimal (12,0), second_variable decimal(13))
on commit preserve rows) by teradata;
execute (commit work) by teradata;


insert into trlib.temp1
select first_variable , second_variable
from YOUR_SAS_TABLE ;


.... other SAS and Teradata retrievals


quit;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 3 replies
  • 10104 views
  • 0 likes
  • 3 in conversation