Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: sql*loader default value

RE: sql*loader default value

From: <gregory.t.norris_at_mail.sprint.com>
Date: Tue, 03 Apr 2001 08:05:26 -0700
Message-ID: <F001.002DF8E6.20010403072022@fatcity.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US