13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>SAS</strong>/<strong>ACCESS</strong> Interface to Teradata 4 Examples 8113 TPT_PACK=3 TPT_PACKMAXIMUM=ExamplesThis example starts the FastLoad facility.libname fload teradata user=testuser password=testpass;data fload.nffloat(bulkload=yes);do x=1 to 1000000;output;end;run;This next example uses FastLoad to append <strong>SAS</strong> data to an empty Teradata tableand specifies the BL_LOG= option to name the error tables Append_Err1 andAppend_Err2. In practice, applications typically append many rows./* Create the empty Teradata table. */proc sql;connect to teradata as tera(user=testuser password=testpass);execute (create table per<strong>for</strong>mers(userid int, salary decimal(10,2), job_desc char(50)))by tera;execute (commit) by tera;quit;/* Create the <strong>SAS</strong> data to load. */data local;input userid 5. salary 9. job_desc $50.;datalines;0433 35993.00 grounds keeper4432 44339.92 code groomer3288 59000.00 manager;/* Append the <strong>SAS</strong> data & name the Teradata error tables. */libname tera teradata user=testuser password=testpass;proc append data=local base=tera.per<strong>for</strong>mers(bulkload=yes bl_log=append_err);run;This example starts the MultiLoad facility.libname trlib teradata user=testuser pw=testpass server=dbc;/* Use MultiLoad to load a table with 2000 rows. */data trlib.mlfloat(MultiLoad=yes);do x=1 to 2000;output;end;run;/* Append another 1000 rows. */data work.testdata;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!