Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004
    Posts
    5

    Unanswered: Problem in SQLLDR

    Hi All,
    I am using the sqlldr to load data with options direct=true and parellel=true.
    now my question is i have some column with unique indexes .
    if at all any record is duplicate then index becomes unusable.
    so what is the solution to delete those records which are violating unique indexes.

    2) can any one provide me the query with the use of hints which does not make use of the
    index which is in un usable state and delete the records.

    Please help me ASAP any one ..

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    You need to run a query like this one:

    delete from mytable t1
    where rowid > (select min(rowid) from mytable t2 where t2.key = t1.key);

    Now, for a table of any significant size that will be very slow without an index, so you should create a non-unique index on the key column(s) first, which can be dropped afterwards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •