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!

Table Type Collection Limitation (GTT Works Well)

Sunil K.Oct 22 2014 — edited Oct 28 2014

i have a procedure in Oracle 12c

NOTE: This is Just a Sample Procedure;

procedure Machine_Insert(xmlData IN XMLTYPE)

AS

     RC SYS\_REFCURSOR;

     Machine\_TBL Machine\_Type; -- Machine\_Type is a Table of Records Created In a package Which is not shown here

BEGIN

    SELECT  ROW\_NUMBER() over (order by MacineNo) MachineID,

        XT.\*

 Bulk Collect Into Machine\_TBL

from    XMLTABLE('/DataSet/Inwards'

PASSING xmlData

  columns

  MachineNo nvarchar2(50) PATH 'MachineNo',

  SlotNo NVARCHAR2(50) PATH 'SlotNo',

  SlotNo1 nvarchar2(50) PATH 'SlotNo1',

  VerifyKEY NVARCHAR2(50) PATH 'VerifyKEY',

  MachineDetail nvarchar2(50) PATH 'MachineDetail',

  MachineDesc nvarchar2(250) PATH 'MachineDesc',

  StockEffected Number(1,0) PATH 'StockEffected',

  IsActive Number(1,0) PATH 'IsActive' ) XT;

/*--Validation Check here (for duplicate records*/

/*--New Records are Inserted into oracle tables*/

--Invalid records are returned back to client

open rc for select * from TABLE(Machine_TBL) where .....;

SYS.DBMS\_SQL.RETURN\_RESULT(RC);

END Machine_Insert;

To Call This Procedure you can download xmlData From https://drive.google.com/file/d/0BwAVQqYmX0-zQ1d1VnNmZndfcVE/view?usp=sharing

I am Getting Error Capture.PNG When when this procedure is called. but when i reduce xml content size then it returns successfully.

does Table Type Collection has any size limitation or i am missing something ??

Message was edited by: Sunil K. I forgot to insert image in my question sorry for the inconvenience.

Note, if i use GTT instead of table type collection no error occurs.

This post has been answered by BluShadow on Oct 24 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 21 2014
Added on Oct 22 2014
24 comments
1,232 views