Chapter Contents

Previous

Next
SCHEMA=

SCHEMA=



Specifies a schema name to be used when referring to any database object.

Default value: Defaults to the value of the LIBNAME option.


Syntax
Details
Example: Accessing an ORACLE table using SCHEMA=
Example: Printing a "Three-level" ORACLE table using SCHEMA=

Syntax

SCHEMA=schema-name

schema-name
specifies a schema name.


Details

If PRESERVE_TAB_NAMES=NO, SAS converts the SCHEMA= value to uppercase because all values in the ORACLE data dictionary are converted to uppercase unless quoted.


Example: Accessing an ORACLE table using SCHEMA=

In this example, SAS sends any reference to employees as scott.employees.

libname mydblib oracle user=marie password=amore path="myorapath";
proc print data=employees (schema=scott);
run;


Example: Printing a "Three-level" ORACLE table using SCHEMA=

In this example, the ORACLE SCHEDULE table resides in the AIRPORTS schema, and is specified as AIRPORTS.SCHEDULE. To access this table in PROC PRINT and still use the libref (CARGO) in the SAS/ACCESS LIBNAME statement, you specify the schema in the SCHEMA= option. Then you put the libref.table in the procedure's DATA statement. In this way, you are able, in effect, to specify a three-level ORACLE name in SAS:

libname cargo oracle schema=airports user=marie password=amore 
        path="myorapath";
proc print data=cargo.schedule;
run;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.