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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Data Set Options <strong>for</strong> <strong>Relational</strong> <strong>Databases</strong> 4 DBLINK= Data Set Option 307table is created by using DEPTNUM as the DBMS column name. SettingDBLABEL=YES enables the label to be used as the column name.data new;label c1=’deptnum’;c1=001;run;data mydblib.mydept(dblabel=yes);set new;run;proc print data=mydblib.mydept;run;DBLINK= Data Set OptionSpecifies a link from your local database to database objects on another server [Oracle]. Specifiesa link from your default database to another database on the server to which you are connected[Sybase].Default value: LIBNAME settingValid in: DATA and PROC steps (when accessing DBMS data using <strong>SAS</strong>/<strong>ACCESS</strong>software)DBMS support: Oracle, SybaseSyntaxDBLINK=database-linkDetailsThis option operates differently in each DBMS.Oracle: A link is a database object that identifies an object that is stored in a remotedatabase. A link contains stored path in<strong>for</strong>mation and can also contain user name andpassword in<strong>for</strong>mation <strong>for</strong> connecting to the remote database. If you specify a link, <strong>SAS</strong>uses the link to access remote objects. If you omit DBLINK=, <strong>SAS</strong> accesses objects inthe local database.Sybase: You can use this option to link to another database within the same server towhich you are connected. If you omit DBLINK=, <strong>SAS</strong> can access objects only in yourdefault database.ExampleIn this example, <strong>SAS</strong> sends MYORADB.EMPLOYEES to Oracle asEMPLOYEES@SALES.HQ.ACME.COM.proc print data=myoradb.employees(dblink=’sales.hq.acme.com’);run;

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

Saved successfully!

Ooh no, something went wrong!