Previous Page | Next Page

LIBNAME Statement: PC Files on Microsoft Windows

DBNULLKEYS



Controls the format of the WHERE clause when you use the DBKEY data set option.
Valid in: DATA and PROC steps (when accessing PC files data using SAS/ACCESS software)
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 option, use DBNULLKEYS=YES. When you specify DBNULLKEYS=YES, and specify a column that is not defined as DBKEY= NOT NULL, SAS generates a WHERE clause that finds NULL values.

If you specify DBKEY=COLUMN and COLUMN is not defined as NOT NULL, SAS generates a WHERE clause.

Example:

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

SAS generates the WHERE clause once and uses it for any value, NULL, or NOT NULL in the column. This syntax can be much less efficient than the shorter form of the WHERE clause. When you specify DBNULLKEYS=NO, or specify a column that is NOT NULL in the DBKEY= option, SAS generates a simple WHERE clause.

If there are no NULL values in the transaction or master table for the columns, use DBNULLKEYS=NO. If you specify DBNULLKEYS=NO and DBKEY=COLUMN, SAS generates a shorter form of the WHERE clause. SAS generates the WHERE clause even if the column DBKEY specifies is defined as NOT NULL.

WHERE (COLUMN = ?)


See Also

DBKEY and LIBNAME Options

Previous Page | Next Page | Top of Page