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 ;

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
  • 3 replies
  • 7101 views
  • 2 likes
  • 4 in conversation