Chapter Contents

Previous

Next
NULLS

NULLS



Specifies whether DBMS columns accept null values.

Optional statement
Default: DBMS specific


Syntax
Details

Syntax

NULLS variable-identifier-1 = Y | N<...variable-identifier-n = Y | N>;

Details

The NULLS statement specifies whether the DBMS columns that are associated with the listed input SAS variables allow null values. Specify Y to accept null values. Specify N to reject null values and to require data in that column. The default is DBMS specific, although for most DBMSs the default is Y.

If you specify N for a numeric column, none of the observations that contain missing values in the corresponding SAS variable are loaded into the table, and a message is written to the SAS log. The current error count is increased by one for each observation that is not loaded. See ERRLIMIT= for more information.

If a character column contains blanks (the SAS missing value) and you have specified N for the DBMS column, then blanks are inserted. If you specify Y, null values are inserted.

The variable-identifier argument can be either the SAS variable name or the positional equivalent from the LIST statement. The positional equivalent is the number that represents the variable's place in the data set. For example, if you want the column that is associated with the third SAS variable to accept null values, submit the following statement:

nulls 3=y;

If you omit the NULLS statement, the DBMS default action occurs. You can list as many variables as you want in one NULLS statement. If you have previously defined a column as NULLS=N, you can use the NULLS statement to redefine it to accept null values.

An editing statement, such as NULLS, must be specified after the database connection statements when you create and load a DBMS table. See LOAD for more information.


Chapter Contents

Previous

Next

Top of Page

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