Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Query about TRAILING NULLCOLS usage

582310Jan 22 2009 — edited Jul 24 2009
Hi,

I'm using SQL Loader for loading flat files to Tables.

Here is my datafile
*****************************
empid|name|dept|salary|grade|
1|shekhar|projects|1000|C|
2|ravi|projects|800|D|
3|rob|projects|1200||
4|Mathew|projects|1400||
*****************************

my ctl file

*****************************
LOAD DATA
INFILE emp.txt "str '|\r\n'"
APPEND INTO TABLE EMP
FIELDS TERMINATED BY '|'
(
EMP_ID
, NAME
, DEPT
, SALARY
, GRADE
)
******************************

Its giving error message

Column not found before end of logical record (use TRAILING NULLCOLS)

I think TRAILING NULLCOLS is used to put null for the columns which are not found. But in my case the grade column value is empty for the empid 3 & 4

If I'm wrong please explain me the usage of TRAILING NULLCOLS.


Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2009
Added on Jan 22 2009
3 comments
10,360 views