Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Skipping blank rows while uploading thru SQLLDR

Status
Not open for further replies.

rk68

Programmer
Jul 15, 2003
171
IN
Hi,
We have user who upload CSV data thru portal & the same is inserted into oracle table thru SQLLDR.
There are instances where the user uploads CSV file which has blank rows as well and these get inserted into the table.
Is there a way to skip blank rows while using SQL loader.

The CSV may look like this
'ABC,123,244.00
'DBC,1G3,144.00
'BrC,343,2234.00
,,,
,,,
,,,
,,,

So how to insert only the 1st 3 lines & skip rest of them?

TIA
Raj
 
If one of the columns you're trying to load is defined as NOT NULL, those lines in the CSV will be considered BAD records and won't be loaded. You can define a BADFILE to catch those.

I think you can also put a 'WHEN FIRSTCOL NO NULL' after the INSERT INTO line. I would need to see your SQLLDR control file to make a detailed suggestion. I don't know what your first column is actually called.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top