Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: sql*loader default value
Thanx to Witold and Prakash for suggesting NULLIF and DEFAULTIF.
Unfortunately, it looks like both of those do basically the opposite of
what I'm trying to accomplish. Essentially, I want to prevent
sql*loader from ever inserting NULL in a column (which may not be
numeric), substituting whatever value is appropriate for the given
application instead. Something like using "nvl(:field,'unknown')" in
the field specification of the control file for conventional path loads.
As far as I can see, there's no way to do this within sql*loader
itself. So the choices would be to run a cleanup just after the load
(which may or may not negate the speed benefits of using direct path),
or to somehow pre-process the data file to fill in the missing values
(perhaps an awk or perl script). Of course, if I'm missing something
obvious please let me know... the sql*loader documentation seems
designed to confuse. (-:
Cheers! Received on Tue Apr 03 2001 - 10:05:26 CDT
![]() |
![]() |