Home » Developer & Programmer » Data Integration » check for null in SQL*Loader DEFAULTIF clause
check for null in SQL*Loader DEFAULTIF clause [message #93447] Tue, 25 January 2005 09:43 Go to previous message
ashish
Messages: 107
Registered: December 2000
Senior Member
Hi

I understand that if the defaultif clause is not specified in the control file for sql*loader, and if the field value is NULL, sql*loader inserts NULL as the value of that field.

However, I have not been able to determine the syntax to set the value of the field to its default value if the value of the field in the data file is null.

I tried doing this:
LOAD DATA
INFILE 'datafile.dat'
APPEND into table tablename
fields terminated by "t"
trailing nullcols(
col1 defaultif (col1 = NULL)
)

But, this does not work. I was wondering if anyone can let me know what should be the syntax of the CONDITION part of the DEFAULTIF clause, so that I can compare it with NULL and set it to default if the value is NULL.

Thanks
 
Read Message
Read Message
Read Message
Previous Topic: Mappings in OWB and update problems.
Next Topic: Oracle Repository
Goto Forum:
  


Current Time: Thu Apr 25 06:31:29 CDT 2024