Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2004
    Posts
    69

    Unanswered: Reg. Bulk Insert statement

    Microsoft SQL Server has "Bulk Insert" statement. Is there an equivalent in Oracle ??

  2. #2
    Join Date
    Jan 2004
    Posts
    99
    yes you can use the SQL LOADER utility for oracle.

  3. #3
    Join Date
    Apr 2004
    Posts
    4
    Hi strawstun,

    You try Parallel Direct-load INSERT

  4. #4
    Join Date
    Apr 2004
    Posts
    69
    Thanks for the response.

    can I execute this from within a procedure using Execute immediate ??

    If yes, are there are any specific limitations ?

  5. #5
    Join Date
    Apr 2002
    Posts
    56
    add the /*+ APPEND */ hint in the dynamic sql.

    Example

    execute immediate 'INSERT /*+ APPEND */ INTO <table_1> into <table_2>';

  6. #6
    Join Date
    Apr 2002
    Posts
    56
    sorry, example should read

    execute immediate 'INSERT /*+ APPEND */ INTO <table_1> select * from <table_2>';

  7. #7
    Join Date
    Apr 2004
    Posts
    69
    Thanks edwin,

    but how do i get the data from the file. Should I use utl_file package and load the data before using the INSERT ... ? I feel this will be slow.

    Is there a simple way (like a single BULK INSERT in SQL Server) to do that.. looks like the "LOAD DATA .." stuff can be executed only from SQLLDR. I want the same to be executed from within a procedure !

  8. #8
    Join Date
    Apr 2002
    Posts
    56
    Depending on which version of Oracle you have you can use External tables. From what I understand you can then define an external table, say table_2, which consists of data in a text file outside of oracle, but you can execute SELECT-on it.

    I've not worked with them, but I guess in your case they could be useful, and my example would work for you.

    Check documentation on External tables for your Oracle version.

Posting Permissions

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