Home » SQL & PL/SQL » SQL & PL/SQL » How to ignore Header in the data file while loading through SQL Loader
How to ignore Header in the data file while loading through SQL Loader [message #189675] Fri, 25 August 2006 09:29 Go to next message
be2sp1
Messages: 52
Registered: September 2005
Location: India
Member
Hi,

I have a control as mentioned below and i want to ignore the Header coming in the data file while loading. The header is coming as 'HDR' in the data file and will be present on top of all the records.

LOAD DATA
-- INFILE './data/QS_STAT_BOOK_EXT.dat'
-- BADFILE './bad/QS_STAT_BOOK_EXT.bad'
-- DISCARDFILE './discarded/QS_STAT_BOOK_EXT.dsc'
TRUNCATE
INTO TABLE QS_STAG_BOOKING_MASTER
FIELDS TERMINATED BY '^' TRAILING NULLCOLS
( BOOKING_ID, BOOKING_NAME)

Thanks
Re: How to ignore Header in the data file while loading through SQL Loader [message #189678 is a reply to message #189675] Fri, 25 August 2006 09:41 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Use SKIP=1

I hesitate though, you say "present on top of all the records", does that mean it will be in the file ONCE for all the records OR listed before EACH individual record.

[Updated on: Fri, 25 August 2006 09:42]

Report message to a moderator

Re: How to ignore Header in the data file while loading through SQL Loader [message #189739 is a reply to message #189678] Sat, 26 August 2006 02:41 Go to previous messageGo to next message
be2sp1
Messages: 52
Registered: September 2005
Location: India
Member
Hi,

thanks for the reply.It will be present once as the first row of the data file.

Re: How to ignore Header in the data file while loading through SQL Loader [message #189752 is a reply to message #189739] Sat, 26 August 2006 08:08 Go to previous message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Specifying SKIP=1 should do the trick for you then.
Previous Topic: Dates and Sorting Data
Next Topic: Oracle Management Server - won't login
Goto Forum:
  


Current Time: Wed Dec 07 12:58:51 CST 2016

Total time taken to generate the page: 0.11863 seconds