oracle - Casting a ref cursor into a table type in pl-sql -


I would like to insert a recircher in a table type as follows: The syntax below does not compile. The objective is to get the results of a refresher in a temporary table and then do some work on that table.

  Make the table vtest1 (number, b number); Make the table attractive (number 1, b number); POUT SYS_REFCURSOR declared; Type vtest1Tab is vtest1% rowtype's table; Start Open Pouch for 'Choose from Vtest1'; Choose from the Insert * tab in the experimental 1 (N1, N2) (Dot (Pouty as vtest1Tab)); Closed POUT; End;   

Thanks.

You can use bulk archive and complete < / Code> instead of ... select :

  Create table vtest1 (a number, b number); Insert Vtest1 values ​​(1,2); Make the table attractive (number 1, b number); POUT SYS_REFCURSOR declared; Type vtest1Tab is vtest1% rowtype's table; V_t vtest1Tab; Start Open Pouch for 'Choose from Vtest1'; POTT bulk gather in v_t; Closed POUT; Insert temptable1 values ​​in v_t (indx) for forall indx in V_t.first..v_t.last; End; /    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -