Previous Page | Next Page

LIBNAME Statement: PC Files on Linux, UNIX, and 64-Bit Microsoft Windows

DBNULLKEYS



Controls the format of the WHERE clause when you use the DBKEY= data set option.
Valid in DATA and PROC steps
Default value LIBNAME setting

Syntax
Details
See Also

Syntax

DBNULLKEYS= YES|NO


Details

If there might be NULL values in the transaction table or the master table for the columns that you specify in the DBKEY= DBKEY option, then use DBNULLKEYS=YES. When you specify DBNULLKEYS=YES and a column not defined as NOT NULL in the DBKEY= option, SAS generates a WHERE clause that can find NULL values. If you specify DBKEY=COLUMN and COLUMN is not defined as NOT NULL, SAS generates a WHERE clause with the following syntax.

WHERE ((COLUMN = ?) OR ((COLUMN IS NULL) AND (? IS NULL)));

SAS prepares the statement once, and uses it for any value (NULL or NOT NULL) in the column.

Note:   This syntax has the potential to be much less efficient than the shorter form of the WHERE clause.  [cautionend]

When you specify DBNULLKEYS=NO or specify a column that is defined as NOT NULL in the DBKEY= option, SAS generates a simple WHERE clause.

If you know that there are no NULL values in the columns specified in the DBKEY= option, use DBNULLKEYS=NO. If you specify DBNULLKEYS=NO and specify DBKEY=COLUMN, SAS generates a shorter form of the WHERE clause.

WHERE (COLUMN = ?)


See Also

To assign this option to a group of tables, use the DBNULLKEYS= option specified in LIBNAME Options.

Previous Page | Next Page | Top of Page