SQL query how to find !! - Page 2
DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: SQL query how to find !!

  1. #11
    Join Date
    Oct 2000
    Posts
    467
    Originally posted by bang_dba
    If i have 100 inserts to be done, and there is a error at 50 th record, then the control jumps to Exception. Right ????

    Is there any way that i just skip this bad record and continue with the rest 50 records ????
    Just give commit after the whole operation...it's faster and better. As for the bad record, check the spool/log file and remove them from the source.
    Last edited by vinit; 01-20-2004 at 07:50 AM.
    Vinit

  2. #12
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    A link to an example at Tom Kyte's website, here
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #13
    Join Date
    Apr 2003
    Posts
    353
    For the inserts, try convert the records to a text file
    and use loader to insert.
    See the bad file.

    THis is the way We are working for inserts.

  4. #14
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Originally posted by engiri
    For the inserts, try convert the records to a text file
    and use loader to insert.
    See the bad file.

    THis is the way We are working for inserts.
    What benefits did you see in this method? It seems a little complex.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  5. #15
    Join Date
    Apr 2003
    Posts
    353
    We find the error data and try to avoid the same at the source of the record.
    Thanks

  6. #16
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    It will be a stupid method ...

    Well how abt capturing the ROWID and Table_Name in an ERR_TABLE ( In the exception handling part ) ??
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  7. #17
    Join Date
    Apr 2003
    Posts
    353
    My example is not exactly fitting, but the automated
    way helped the requirement of our client.

    We have to upload data from one of our client who is running Tally,
    and part of the data from his oracle database.
    We convert the same to text file and load the same to Oracle.

    We will load the same into a temporary table and convert the successful records to the main database, error records to another table, find and troubleshoot the errors and again
    load the same to the main database.

    This automation works fine (Only for inserts).

Posting Permissions

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


Click Here to Expand Forum to Full Width