Home » RDBMS Server » Server Utilities » Data loading
Data loading [message #290728] Mon, 31 December 2007 05:14 Go to next message
vanathi
Messages: 74
Registered: December 2007
Location: India
Member
Hi,

I am loading data from csv to oracle table using control files.
The line of that csv includes the header line having the details like date and time, name etc.
But the count in the table after loading also it shows the same count.
It should reject the header row. I am loading many files.
They are rejecting the header row of their csv.
But I am getting this type of output in that particular file.
Also I checked for the header in the table. It is not there.

Please advice.

Thanks in advance.
Re: Data loading [message #290731 is a reply to message #290728] Mon, 31 December 2007 05:21 Go to previous messageGo to next message
Michel Cadot
Messages: 68665
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:

But the count in the table after loading also it shows the same count.

The same count of what?

Your post is unclear.
If you want SQL*Loader skips the header then add SKIP=1 in your call.

Regards
Michel
Re: Data loading [message #290733 is a reply to message #290731] Mon, 31 December 2007 05:24 Go to previous messageGo to next message
vanathi
Messages: 74
Registered: December 2007
Location: India
Member
Same line count in the unix csv file.
and same no of rows in table.

Thank you Michel.
Re: Data loading [message #290737 is a reply to message #290733] Mon, 31 December 2007 05:48 Go to previous messageGo to next message
Littlefoot
Messages: 21811
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:

It should reject the header row
Are you sure? What if the header row also satisfies conditions needed to load records and isn't rejected?

Perhaps you could attach table description, control file and first several lines of the input file (and even the SQL*Loader log file).
Re: Data loading [message #290744 is a reply to message #290728] Mon, 31 December 2007 06:18 Go to previous message
vanathi
Messages: 74
Registered: December 2007
Location: India
Member
Thank you friends.I found my mistake.

load data
append
into table PARTCORE3
fields terminated by "," OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS (
FIELD FILLER,
CONTACTCODE CHAR,
RELATIONSHIPTYPE CHAR,
PORTFOLIOCODE CHAR,
PROCESSED CONSTANT "N",
ID__ "db_seq_PART.nextval"
)

This is my control file. Here that partcore3 is having that first column contactcode varchar(32). The loader is checking the header. It is very less (<32). So it is taking the header row also. The header is also inside the table.

I couldnt find that. Sorry friends.
I used Michel's idea. It is working.

Thanks Michel and Littlefoot. Smile
Previous Topic: SQL * Loader usage in differentiating between the files
Next Topic: SQL* Loader
Goto Forum:
  


Current Time: Sat Jun 29 06:04:23 CDT 2024