Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

INVALID NUMBER ERROR

Debanjan BanerjeeJun 29 2015 — edited Jun 29 2015

Hi All,

I am facing the below error while executing a procedure.

Below is the error:

*

ERROR at line 1:

ORA-01722: invalid number

ORA-06512: at "APPS.BULK_ITEM_INTERFACE_INSERT", line 266

ORA-06512: at line 1

Below is my Procedure:

CREATE OR REPLACE PROCEDURE bulk_item_interface_insert

IS

   CURSOR cur_item_assgn

   IS

      SELECT BLA BLA BLA,

           

             1 inventory_item_id, stg.organization_id organization_id,

           

        FROM my_staging_table stg

       WHERE request_id = 697776 AND status = 'P';

   TYPE t_item_intf_tbl IS TABLE OF mtl_system_items_interface%ROWTYPE;

   g_login_id        NUMBER          := 1227;

   g_user_id         NUMBER          := 1227;

   l_item_intf_tbl   t_item_intf_tbl;

BEGIN

   OPEN cur_item_assgn;

   FETCH cur_item_assgn

   BULK COLLECT INTO l_item_intf_tbl;

   FORALL i IN l_item_intf_tbl.FIRST .. l_item_intf_tbl.LAST SAVE EXCEPTIONS

      INSERT INTO mtl_system_items_interface

                  (inventory_item_id

                  )

           VALUES ((l_item_intf_tbl (i).inventory_item_id)

                  );

EXCEPTION

   WHEN OTHERS

   THEN

      RAISE;

END;

/

The strange thing is when I am using FOR LOOP I dont get any error.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 27 2015
Added on Jun 29 2015
19 comments
2,031 views