SQL*Loader convert Char to NULL [message #176985] |
Mon, 12 June 2006 05:24 |
zodiac_hh
Messages: 10 Registered: June 2006
|
Junior Member |
|
|
Hi,
I would like to load a dump file into my data base via SQL*Loader. One of the fields in the dump contains "~" as an replacement for NULL values. How do I convert these Strings/Chars which only consist of ~ to NULL values in the database? I think it would work with an SQL Expression in the field definition of the CTL-File, but I am not familiar with the SQL functions Oracle offers.
|
|
|
|
Re: SQL*Loader convert Char to NULL [message #177006 is a reply to message #176986] |
Mon, 12 June 2006 07:53 |
zodiac_hh
Messages: 10 Registered: June 2006
|
Junior Member |
|
|
Thanks for the hint, but that doesn't work in this case.
One field (I am using fixed length records by the way) contains this as a NULL value: (without quotation marks). So there's some leading white space and that seems to break the comparison with the '~'. The other way round (~ with trailing blanks) works just fine.
Here's a snippet of my CTL-File:
K_FEHLM POSITION(289) CHAR(13) NULLIF K_FEHLM = '~', and that fails with ORA-01722: invalid number because the value doesn't get converted to NULL.
Do you have another hint for me?
|
|
|
|