Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7517535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:29:01+00:00 2026-05-30T01:29:01+00:00

I get this error when I call the procedure ‘archive_things’ which in turns gives

  • 0

I get this error when I call the procedure ‘archive_things’ which in turns gives the error at INSERT INTO deleted_part_things
(id, part_id, file_name, file_type, thing, editable)

what does this mean?

 PROCEDURE archive_things ( p_part_id IN NUMBER ) 
 IS    
  thing_list  bean_list;
 BEGIN

 thing_list := get_thingss_info(p_part_id);

 insert_deleted_things(thing_list);

 END archive_things;



 FUNCTION get_things_info ( p_part_id IN NUMBER)
  RETURN bean_list
 IS
  attachment_list  bean_list;
 BEGIN

  SELECT file_thing_bean (id, hot_part_id, file_name, file_type, thing, editable)
  BULK COLLECT INTO thing_list
  FROM part_things
  WHERE part_id =hot_part_id;

  RETURN thing_list;

END get_things_info;



PROCEDURE insert_deleted_things(  p_bean_list IN bean_list ) 

IS BEGIN    

FORALL x IN INDICES OF p_bean_list       
    INSERT INTO deleted_part_things
        (id, part_id, file_name, file_type, thing, auditable)  <<<<<  ERROR HERE!!!!!     
         VALUES 
         (   p_bean_list(x).id, p_bean_list(x).parent_id,  p_bean_list(x).file_name,  p_bean_list(x).file_type,
              p_bean_list(x).thing,   p_bean_list(x).editable
        );             

     END insert_deleted_things;  
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T01:29:03+00:00Added an answer on May 30, 2026 at 1:29 am

    Two points:

    1. In your last question you mentioned that you’re running Oracle 10g. As Ollie pointed out in his answer you can’t use the method you’re using until 11g.
    2. Why are you creating two procedures and a function? This could easily be one procedure. As the initial procedure you’re calling calls the other two you gain nothing by splitting it and make it much more complicated.

    PLS-00436 is a restriction prior to 11G whereby you’re not able to reference columns in a rowtype in a forall. There are a few ways round it:

    One, as Ollie suggested is to have the same number of columns in your table as in your bulk collect. This isn’t always possible.

    Tom Kyte suggests set operations. The restriction on this is the size of the bulk collect you’re doing. If it’s bigger than the amount of undo you’re going to have problems. Also if you want to do something else with the data then you have to do that separately.

    The last option ( that I know of I’m sure there are more ) is to collect your records into individual types rather than a rowtype as per the following. The downside of this is that it may not be as quick as Tom’s method and it’s by no mean as clear as Ollie’s.

    I’ve just noted Sathya’s method, which would also work but requires a lot of SQL to be executed.

    PROCEDURE archive_things ( p_part_id IN NUMBER ) IS
    
       CURSOR c_get_all ( Cpart_id char) is
          SELECT file_attachment_bean (id, hot_part_id, file_name
                             , file_type, attachment, auditable)
            FROM hot_part_attachments
           WHERE hot_part_id = Cpart_id;
    
       t_id bean_list.id%type;
       t_hot_part_id bean_list.hot_part_id%type;
       t_file_name bean_list.file_name%type;
       t_file_type bean_list.file_type%type;
       t_attachment bean_list.attachment%type;
       t_auditable bean_list.auditable%type;
    
    BEGIN
    
       OPEN c_get_all(p_part_id);
       FETCH c_get_all bulk collect into
         t_id, t_hot_part_id, t_file_name, t_file_type, t_attachment, t_auditable;
    
       LOOP
    
          EXIT WHEN t_id.count = 0;
    
          FORALL x IN t_id.first .. t_id.last       
             INSERT INTO deleted_hot_part_attachments (id, hot_part_id, file_name, file_type
                                                       , attachment, auditable)     
             VALUES ( t_id(x), t_hot_part_id(x), t_file_name(x), t_file_type(x)
                    , t_attachment(x), t_auditable(x) );
    
          COMMIT; -- You may want to do this outside the procedure.
    
       END LOOP;
    
       CLOSE c_get_all;
    
    END;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Everytime call this stored procedure i get this error: #1064 - You have an
whenever I try to call my ejb from a client, I get this error
I get this error on an update panel within a popupControlExtender which is within
I get this error: Can't locate Foo.pm in @INC Is there an easier way
I get this error when I do an svn update : Working copy XXXXXXXX
I get this error:- You have an error in your SQL syntax; check the
We get this error in Visual Studio 2005 and TFS very often. Can anyone
i get this error {Method 'System.DateTime ConvertTimeFromUtc(System.DateTime, System.TimeZoneInfo)' has no supported translation to SQL.}
I get this error message when installing SQL 2005 Analysis services. The cabinet File
I get this error: System.Reflection.TargetException: Object does not match target type. when trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.