| LIBNAME Statement: PC Files on Microsoft Windows |
| 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, then 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. For example, if you specify DBKEY=COLUMN and COLUMN is not defined as NOT NULL, SAS generates a WHERE clause with this syntax:
WHERE ((COLUMN = ?) OR ((COLUMN IS NULL) AND (? IS NULL)))
This syntax enables SAS to prepare the statement once and use it for any value (NULL or NOT NULL) in the column. Note that this syntax has the potential to be much less efficient than the shorter form of the WHERE clause (presented below). 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 there are no NULL values in the transaction table or the master table for the columns listed in the DBKEY option, use DBNULLKEYS=NO. If you specify DBNULLKEYS=NO and DBKEY=COLUMN, SAS generates a shorter form of the WHERE clause. This WHERE clause is generated even if the column that DBKEY specifies is defined as NOT NULL.
WHERE (COLUMN = ?)
| See Also |
To assign this option to a group of tables, use the DBNULLKEYS option specified in LIBNAME Options.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.