ORA-06531: Reference to uninitialized collection
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: ORA-06531: Reference to uninitialized collection

  1. #1
    Join Date
    Jul 2008
    Posts
    2

    ORA-06531: Reference to uninitialized collection

    gyu
    Last edited by dilforyou; 07-08-2008 at 02:59 AM.

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    3,997
    Perhaps you might actually post the code showing what you are trying to do. I created a short test to show what would happen if no rows are returned from the query used to populate the collection. you can see that it is a different error. I don't think anyone will be able to help you until they know what you are trying to do.

    Code:
    SQL> declare
       type type1 is table of varchar2(128)
          index by pls_integer;
    
       tab1 type1;
    begin
       select table_name
         bulk collect
         into tab1
         from dba_tables
        where 1=0;
    
       dbms_output.put_line(tab1(1));
    
       for i IN tab1.first..tab1.last
       loop
          dbms_output.put_line(tab1(i));
       end loop;
    end;
    /
      2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20  declare
    *
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at line 13
    this space intentionally left blank

  3. #3
    Join Date
    Jul 2008
    Posts
    2
    Thanks for ur reply.problem solved

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    Quote Originally Posted by dilforyou
    Thanks for ur reply.problem solved
    Why did you kill your initial post? that's not polite.
    Gandolf volunteer his valuable time looking at your case, don't you think a plain "problem solved" post is kind of disrespectful?
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

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