2 Replies Latest reply: Jan 2, 2013 8:17 AM by Srini Chavali-Oracle RSS

    Load Data includes Header Row

    976439
      Hi, i am looking for some help in regards to my control file. I have managed to write one which successfully adds the data I require. Whilst validating my data I have noticed that the header row is being added as a record and I need this to not be included. The following is my control file.
      OPTIONS (DIRECT=TRUE, ERRORS=0)
      load data
      infile 'A:/Files/Daily Feeds/20121202/data_summary_5_20121203_367.txt' "STR '\n'"
      
      APPEND
       into table DATA_5
       WHEN (ID <> 'ID')
       fields terminated by "~|~" optionally enclosed by '"'
      TRAILING NULLCOLS 
       ( 
           ID,     
           TIMESTAMP                          timestamp 'DD-MON-RR HH:MI:SS.FF3 PM',
           ARRIVAL                    timestamp 'DD-MON-RR HH:MI:SS.FF3 PM',
           MESSAGEID,     
           ORIGINATINGEMAIL,     
           MAILBOX,
           SUBJECT,     
           TIMESTAMPMQI               timestamp 'DD-MON-RR HH:MI:SS.FF3 PM',
           ORIGINATIONQUEUE,     
           TIMESTAMPST               timestamp 'DD-MON-RR HH:MI:SS.FF3 PM',
           TARGET,     
           CODE,     
           TIMESTAMPSTOP               timestamp 'DD-MON-RR HH:MI:SS.FF3 PM',
           FINALP
       )
      If somebody could please where I have gone wrong as would rather correct the load file rather than run a delete command in sql.

      Thanks in advance.