how to skip the bad record and continue with loading in SQL Loader?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Flora Vinarashi
    New Member
    • Sep 2010
    • 3

    how to skip the bad record and continue with loading in SQL Loader?

    Hi,

    I am trying to load data file into database in sql loader. How to skip the bad record alone and continue with loading?

    For eg. I am trying to load data file which has 100 records.The 50th record encounters an error.At present only 49 records gets loaded and it stops from 50th record. I want first 49 records as well as 51st to 100th record to be loaded at the same time and 50th records should be written in the bad file. how to skip the 50th record alone and continue the same loading process from 51st record?

    Please guide me.
    Reply asap.

    Thanks,

    Flora
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    once you specify bad file name in the control file, sql loader should do that for you.

    Comment

    • amitpatel66
      Recognized Expert Top Contributor
      • Mar 2007
      • 2358

      #3
      try this:

      [code=oracle]

      SQLLDR USERID = apps/apps_password CONTROl = x.ctl DATA = dat.txt BAD = dat.bad DISCARD = dat.dsc ERRORS=1000000

      [/code]

      If you note in the above command, I have used ERRORS=1000000 i.e. the complete load will be aborted only when the ERROR count reaches 1,000,000. Until then, the load will ignore the errored record and continue loading from next record.

      Comment

      • Flora Vinarashi
        New Member
        • Sep 2010
        • 3

        #4
        Hi Amit,

        Thanks a lot. Its working fine now..

        Thanks,
        Flora.

        Comment

        • snehasismishra1
          New Member
          • Aug 2011
          • 18

          #5
          Hi Flora,

          I have also same question as you had. But i have no idea how to use "SQLLDR USERID = apps/apps_password CONTROl = x.ctl DATA = dat.txt BAD = dat.bad DISCARD = dat.dsc ERRORS=1000000 " in Select statement.

          Could you please suggest me.

          Thanks,
          Snehasis

          Comment

          Working...