| Retrieve table data from PL/SQL into OCCI [message #351700] |
Thu, 02 October 2008 10:12  |
ThMielke Messages: 3 Registered: October 2008 |
Junior Member |
|
|
I have an anonymous PL/SQL procedure executed from OCCI like:
declare
type temp is table of emp%rowtype;
vemp temp;
begin
select * bulk collect into vemp
from emp where nose = 'red';
open :1 for select * from table(vemp);
end
and a cpp code like:
string stmt = "see above";
stmt->registerOutParam (1, OCCICURSOR);
stmt->execute ();
The "execute" gives me the error (of course):
PLS-00642: local collection types not allowed in SQL statements
O.k., I cannot select from an PL/SQL table.
But how to transfer these PL/SQL table "vemp" into my OCCI program?
Note: the first select is for information only, so I can not select the data in question from that directly.
|
|
|
|
|
|
|
| Re: Retrieve table data from PL/SQL into OCCI [message #351789 is a reply to message #351788] |
Fri, 03 October 2008 02:42   |
Michel Cadot Messages: 28986 Registered: March 2007 Location: Nanterre, France, http://... |
Senior Member |
|
|
| Michel Cadot wrote on Thu, 02 October 2008 17:27 | You have to create a SQL type (with CREATE TYPE), you can't use a PL/SQL type.
Regards
Michel
|
But it is NOT efficient, and will never be: you fetch twice the same data.
Regards
Michel
|
|
|
|