Sorry I misunderstood your request. Try something like this:
THE_VAL POSITION(111:120) DECIMAL EXTERNAL
"NVL(:THE_VAL, 33)"
It works for me - inserts 33 into numeric column when the datafile
contains spaces or nothing (if it is the last field)
HTH
Witold
On 3 Apr 2001, at 7:20,
Gregory,
On doing some research, found that a number column can be populated with a 0
using the direct load path, if the input value is null by having the
following line in the control file:
field1 integer external defaultif (field1 = 'NULL')
But the same thing doesn't work for char columns.
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 what
Greg, look into the 'defaultif' option.
Prakash
-Original Message-
[mailto:[EMAIL PROTECTED]]
Sent: Monday, April 02, 2001 2:50 PM
To: Multiple recipients of list ORACLE-L
When using direct path loads, is it possible to have sql*loader insert a
default value in place of NULL for blank
Try using in the control file:
NULLIF MY_COLUMN=BLANKS
eg:
MY_COLUMN POSITION(24:535) CHAR NULLIF
MY_COLUMN=BLANKS
HTH
Witold
On 2 Apr 2001, at 10:50, [EMAIL PROTECTED] wrote:
> When using direct path loads, is it possible to have sql*loader insert a
> default value in place of NU