BookmarkSubscribeRSS Feed
mrsamtime
Calcite | Level 5
I am trying to load a simple SAS file with about 200 observations on it to Teradata, so I can use these as limiting criteria on a query. I don't have the ability to create tables in teradata, so the only option is to load the overstrains to a volatile table and then use that in my query.

The only help I am getting through local channels is to not use SAS and use Teradata SQL assistant. I am a big fan of SAS, and I think it should be able to support this functionality, but everything I have tried has ended in failure. Has anyone been able to do this?
3 REPLIES 3
LinusH
Tourmaline | Level 20
Maybe you don't have do load a Teradata table. take a look at the DBKEY= option.
http://support.sas.com/documentation/cdl/en/acreldb/61890/HTML/default/a002253008.htm

/Linus
Data never sleeps
Peter_C
Rhodochrosite | Level 12
through the odbc access I was able to pass an "in-list" to support a teradata query.
You might have luck with a similar approach. It turns data into syntax, but it worked for me.

good uck
PeterC Message was edited by: Peter.C
HeatherS_Highmark
Fluorite | Level 6
libname x teradata user=&userid password=&passwd server=myTeradataServer connection=global;

/* Create a volatile table */
option debug=dbms_timers
sastrace=',,,d'
sastraceloc=saslog no$stsuffix;

proc sql;
connect to teradata(user=&userid password=&passwd server=myTeradataServer
connection=global bulkload=yes);
execute
(CREATE VOLATILE TABLE temp1 (var1 varchar(15)) ON COMMIT PRESERVE ROWS ) by
teradata; execute ( COMMIT WORK ) by teradata; INSERT INTO x.temp1
SELECT * FROM mysasdataset.var1;

quit;


/* Connect to the volatile table through the global connect.*/
rsubmit;
option debug=dbms_timers
sastrace=',,,d'
sastraceloc=saslog no$stsuffix;

proc sql;
connect to teradata (user=&userid password=&passwd server=myTeradataServer
connection=global);
select * from connection to teradata
( select b.* from a, b
where xxxxxx);
quit;



/* Volatile table is automatically dropped */

libname x clear ;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 3 replies
  • 8078 views
  • 2 likes
  • 4 in conversation