libname viewlib v9 'library-path'; proc sql; create view viewlib.mygrades as select * from mytddata.grades using libname mytddata teradata server=mytera user=myid pass...
proc sql; connect to teradata as myconn (server=mytera user=myid password=mypw); select * from connection to myconn (select * from grades where final gt 90); disconnect from myconn; quit;
/* Création d'une table CAS temporaire pour simuler la table 'employees' sur Teradata */ /* Dans un environnement réel, la table 'employees' existerait sur Teradata. */ /* Ici, 'TDcaslib' est une caslib logique pointant vers la table casuser.employees. */ data casuser.employees; input Employe...
libname mytddata teradata server=mytera user=myid password=mypw; data mytddata.grades; input student $ test1 test2 final; datalines; Fred 66 80 70 Wilma 97 91 98 ; proc datasets library=mytddata; run; quit;
libname target 'library-path'; libname mytddata teradata server=mytera user=myid password=mypw; data target.highgrades / view=target.highgrades; set mytddata.grades; where final gt 80; run; proc print data=target.highgrades; run; proc datasets library=target; run; quit;
libname mytddata teradata server=mytera user=myid password=mypw; data mytddata.grades; input student $ test1 test2 final; datalines; Fred 66 80 70 Wilma 97 91 98 ; proc datasets library=mytddata; run; quit;
libname viewlib v9 'library-path'; proc sql; create view viewlib.mygrades as select * from mytddata.grades using libname mytddata teradata server=mytera user=myid password=mypw; quit; proc print data=viewlib.mygrades noobs; ...
proc sql; connect to teradata as myconn (server=mytera user=myid password=mypw); select * from connection to myconn (select * from grades where final gt 90); disconnect from myconn; quit;
When you inherit SAS codes that perform complex queries (numerous joins, tables with 40 to 100 million rows), performance quickly becomes the main challenge. A recurring question then arises: should you use the easy method of the LIBNAME engine or hard-code it via SQL Pass-Through?This article ex...