-
SQL Control file
I have a csv file containing NULL columns.
for example,
BASIC","5317",,,,,130,1,12
BASIC","5313",,,,,130,1,12
I need to load the data to the table for which all the columns are defined with NOT NULL constraint.
Since i have bulk data to load, it is not possible to fill the null columns with zeros or spaces. Is there any way to load the csv file without modifying the csv file and table defintion.?
I am using SQL loader for this purpose. Please let me know if there is a way change the control file to get the desired results.
-
Defaultif
If the table definition has column defaults, use the DEFAULTIF clause in the controlfile fields.
Othewise code something like this:
Code:
LOAD DATA
-- etc --
INTO TABLE -- etc --
(...
, fieldx "NVL(:fieldx,'{default value here}')"
, ...
"The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|