Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005
    Posts
    116

    Question Unanswered: Updating/inserting bulk data

    Hi Guys,
    I have a question, i managed to come up with 2 solutions, but just wanted to ask for some opinion

    Task
    -----------------------------------------------------------------------
    To update/insert data in a particular table from a position based flat file


    Solution 1
    -----------------------------------------------------------------------
    1) Write a pl/sql script using utl_file utility to read records one-by-one
    split it accordingly, and then update or insert

    Solution 2
    -----------------------------------------------------------------------
    1) Create an external table pointing to the flat file
    2) Write a pl/sql procedure just to store the sql statements for update/
    insert (merge statement)


    In my opinion, solution 2 is better in terms of the performance, but im not sure
    which one is more practical.
    Last edited by a1jit; 03-16-07 at 00:15.

  2. #2
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    Option 2 will be much faster, quicker for you to write, have better error reporting and simpler for other people to understand.

    Alan

  3. #3
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    Option 3) could be using sql*loader..

Posting Permissions

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