Is it possible to run embedded R script from PL/SQL? All the examples are for SQL.
When I try to run SQL (embedded R) in PL/SQL, I get this error:
ORA-06550: line 2, column 37:
PL/SQL: ORA-22905: cannot access rows from a non-nested table item
ORA-06550: line 2, column 4:
PL/SQL: SQL Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
Code used:
begin
select 1230000, 1, 123, val from table(rqTableEval(
cursor(select 1,2,3 from dual),
NULL,
'select 1 val from dual',
'PR12')
);
end;
Working code:
select 1230000, 1, 123, val from table(rqTableEval(
cursor(select 1,2,3 from dual),
NULL,
'select 1 val from dual',
'PR12')
);
# PR12 is just a simple function.
Thank you,
George