How to fix the Oracle error SQL*Loader-00426: count of elements in VARRAY string comes after the data for the varray?

In this post, you’ll learn more about the Oracle ErrorSQL*Loader-00426: count of elements in VARRAY string comes after the data for the varray with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

SQL*Loader-00426: count of elements in VARRAY string comes after the data for the varray

Reason for the Error SQL*Loader-00426: count of elements in VARRAY string comes after the data for the varray

The COUNT clause for a VARRAY field indicates that the count of elements in the varray is stored in another data field. However, that data field comes after the varray data in the data file. Since finding the count field would require SQL*Loader to know the number of elements in the VARRAY first, SQL*Loader requires that the count field come before the VARRAY data.

How to fix the Error SQL*Loader-00426: count of elements in VARRAY string comes after the data for the varray ?

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

Move the count field to be before the collection data in the data file.