Pages

OracleEBSpro is purely for knowledge sharing and learning purpose, with the main focus on Oracle E-Business Suite Product and other related Oracle Technologies.

I'm NOT responsible for any damages in whatever form caused by the usage of the content of this blog.

I share my Oracle knowledge through this blog. All my posts in this blog are based on my experience, reading oracle websites, books, forums and other blogs. I invite people to read and suggest ways to improve this blog.


Monday, April 15, 2013

SQL Loader OPTIONS

Sometimes when you upload an Excel sheet using SQL* Loader, you want Excel sheet to ignore the Heading of the Excel sheet and want to uplaod from the second record, So you can consider the option of <> in the SQL Statement as below,

OPTIONS (ERRORS=1, SKIP=1)
LOAD DATA
REPLACE
INTO TABLE XXX.TEST
WHEN Inv_It_Ctgry <> 'Inventory Item category'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
( Inv_It_Ctgry CHAR(120)
,SERV CHAR(8)
,CREATED_BY DECIMAL EXTERNAL
,CREATION_DATE DATE(11) "DD-MON-YYYY"
)

And you do not want the Program to give a WARNING on ignoring the First record, for that you add the OPTIONS clause to ignore in case of 1 Record fail, and Skip the Error.

No comments:

Post a Comment