libname spds sasspds 'conversion_area' server=husky.spdsname user='siteusr1' prompt=yes; proc copy in=sashelp out=spds; run;
proc copy in=sashelp out=spds; select cars; run;
data spds.cars; set sashelp.cars ; run ;
/* Create an empty server table with the same */ /* columns and column attributes as the existing */ /* SAS table. */ data spds.cars3 (index=(make origin type)); set sashelp.cars(obs=0); run; /* Use PROC APPEND to append the data in SAS table */ /* Cars to server table Cars. The append to the */ /* server table and its indexes will occur in parallel. */ proc append base=spds.cars3 data=sashelp.cars; run;
libname spds sasspds 'conversion_area' server=husky.spdsname user='siteusr1' prompt=yes ip=yes; option dbidirectexec=yes; proc sql; create table spds.cars4 as select * from sashelp.cars; quit;
proc sql; create table spds.cars5 as select make, model, origin, type, msrp from sashelp.cars; quit;
proc sql; connect to sasspds (host="husky" service="spdsname" dbq="conversion_area" user="siteusr1" prompt=yes); execute( copy table copycars from cars3 ) by sasspds; disconnect from sasspds; quit;
proc sql; connect to sasspds (host="husky" service="spdsname" dbq="conversion_area" user="siteusr1" prompt=yes); execute( load table carload with index make on (make), index origin on (origin), index model on (model) as select * from cars3 ) by sasspds; disconnect from sasspds; quit;
proc sql; connect to sasspds (host="husky" service="spdsname" dbq="conversion_area" user="siteusr1" prompt=yes); execute( load table fordcars with index origin on (origin), index model on (model)) by sasspds; select * from connection to sasspds (as select Make, Model, Origin, Type, MSRP, Invoice from cars3 where make="ford"); disconnect from sasspds; quit;