
88 |
 |
SQL*Loader’s default behavior
When you are loading columnar, character-based data, SQL*Loader’s
default behavior is to recognize whitespace as representing a null
value. Take a look at the following two rows of data:
Copyright © 2001 O’Reilly & Associates, Inc. All rights
reserved. |
|
 |
 |
Handling Anomalous Data
|
 |

3. SQL*Loader checks to see if the resulting field length is
zero.
If a character field consists entirely of spaces, then after those
spaces have been trimmed off, the resulting field length will be zero.
SQL*Loader interprets zero-length character fields as nulls.
as |
INTEGER |
EXTERNAL |
and |
DECIMAL |
EXTERNAL |
are |
|
you are using nonportable datatypes. SQL*Loader only trims
whitespace on character |
whitespace won’t be trimmed, and the length will never be zero. The
only way to derive null values from such fields is to use the NULLIF and
DEFAULTIF clauses.
The effect of PRESERVE BLANKS
Copyright © 2001 O’Reilly & Associates, Inc. All rights
reserved. |
|
 |
 |