sql loader control file question
I have been looking through the SQL*Loader documentation this afternoon, but haven't found what I need.
In my control file, I am loading a char. field that if it is blank or null, I want to load it as "0".
I don't see where NULLIF or DEFAULTIF help me with this. Can some one tell me how to do it?
Thanks in advance.
use decode such as
decode(:filed_a, null, '0', :field_a)
however defaultif does what you want as well, you may need to use preserve blanks, defaultif sets non-numeric to NULL and numeric to 0 if the condition is satisfied
I would like to be able to use the decode function, but this is what I got when I tried it:
SQL*Loader: Release 220.127.116.11.0 - Production on Fri Sep 3 15:8:54 2004
(c) Copyright 1998 Oracle Corporation. All rights reserved.
SQL*Loader-350: Syntax error at line 7.
Expecting "," or ")", found "(".
decode(:METER_NBR, NULL, '0', :METER_NBR),
Click Here to Expand Forum to Full Width