How to fix the Oracle error SQL*Loader-00820: cannot create where clause with range for table string?

In this post, you’ll learn more about the Oracle ErrorSQL*Loader-00820: cannot create where clause with range for table string with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

SQL*Loader-00820: cannot create where clause with range for table string

Reason for the Error SQL*Loader-00820: cannot create where clause with range for table string

The EXTERNAL_TABLE parameter was specified for a multi-table load, and a WHEN clause for one of the tables contains a reference to a range of bytes in the record. SQL Loader uses the WHEN clause from the control file to generate the WHERE clause in the INSERT statement. If the WHERE clause contains a reference to a range of bytes in the table, then a valid WHERE clause can not be generated. Note that SQL Loader will proceed as if GENERATE_ONLY was specified for the EXTERNAL_TABLE parameter.

How to fix the Error SQL*Loader-00820: cannot create where clause with range for table string ?

You can fix this error in Oracle by following the below steps

Modify the control file to only use field references in the WHEN clause. Note that this may require creating a filler field. Another alternative is to create one control file for each table to be loaded and load the table separately.

Tags :

Leave Your Comment