My Oracle Support Banner

When Using a SELECT Statement in a SQL*Loader EXPRESSION Clause, Data is Loaded When Using Conventional Path But Not When Using Direct Path (Doc ID 2287819.1)

Last updated on OCTOBER 09, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.
NOTE: In the images and/or the document content below, the user information and data used represents fictitious data.
Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.

Symptoms

When loading data using the SQL*Loader utility with direct path, and the EXPRESSION clause contains a query that depends upon other database tables than the one being loaded, e.g.

OPTIONS (direct=true)
LOAD DATA INFILE '/<DIR>/teams.dat'
TRUNCATE
INTO TABLE <TABLE_NAME1>
FIELDS TERMINATED BY ','
trailing nullcols
(
TEAM_NAME,
TEAM_GROUND expression "(SELECT TEAM_GROUND FROM <TABLE_NAME2> i WHERE i.TEAM_NAME = :TEAM_NAME)",
CAPACITY,
DIVISION
)

It is noticed that no data is loaded, and there are no errors. However, if line 'OPTIONS (direct=true)' is removed from the control file (meaning that conventional path is used), then all the data is loaded without issue.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.