Results 1 to 5 of 5

Thread: Bulk Collect

  1. #1
    Join Date
    Apr 2003
    Location
    NY
    Posts
    208

    Unanswered: Bulk Collect

    Is it possible to Bulk Collect a multi-column cursor into a pl/sql table based on a record?

    I tried the following as a test and it failed. Anyone have a method that works for them?

    PHP Code:
    cursor c_test is
       select to_number
    (15id,
              
    'ABC' value   
       from dual
    ;

    type t_table is table of c_test%rowtype
      index by binary_integer
    ;   
      
      
    lv_table t_table;

    begin

       open c_test
    ;
       
    fetch c_test bulk collect into lv_table;
       
    close c_test
    results in
    PLS-00597: expression 'LV_TABLE' in the INTO list is of wrong type

  2. #2
    Join Date
    May 2004
    Location
    Redwood Shores, CA
    Posts
    68

    That's if you have 9.2

    In 9.2 you can.
    I have 8i so I have to deal with the same. :-(
    My way or the highway. Yeah

  3. #3
    Join Date
    Apr 2003
    Location
    NY
    Posts
    208
    I am on 9.2.0.2.0. Still getting the PLS-00597 error. Any ideas?

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    go to http://asktom.oracle.com
    do a keyword search on
    BULK COLLECT
    Read a few of the 459 articles to see how to code it correctly
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    May 2004
    Location
    Redwood Shores, CA
    Posts
    68

    9.2 release 2

    Quote Originally Posted by carloa
    I am on 9.2.0.2.0. Still getting the PLS-00597 error. Any ideas?
    You need Oracle 9.2 release 2 which is (i think) 9.2.2
    I think your is release 1 or 0 or something.

    Your code looks fine.
    My way or the highway. Yeah

Posting Permissions

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