Skip to Main Content

Data Science & Machine Learning

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!

Running ORE from PL/SQL

765466May 23 2017 — edited Oct 19 2017

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

This post has been answered by rtiran on May 24 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 21 2017
Added on May 23 2017
1 comment
716 views