0
votes

I want to ignore last line from .csv file whose all fields are null. But while importing the data I don't want SQL loader to generate an error saying "Rows not loaded because all fields were null" or "Row not loaded because all WHEN clauses were failed". I want it to import data without generating any error.

Is there any way to do that? I have tried Trailing Nullcols and it doesn't work.

1

1 Answers

0
votes

If you can know how many rows are in the file ahead of time you can use the LOAD= option to tell sqlldr how many rows to load. On the other hand, if you are doing pre-processing to figure that out then you could just remove the blank line, unless your spec is to not alter files.

Or just load all rows into a staging table and process from there, which is a common way to handle loading.