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!

Use TABLE Operator on table of %rowtype

MateuszHJan 3 2018 — edited Jan 4 2018

Hi,

I have query where i am using custom table type (TESTM table has only ID and Name columns)

I want get results via TABLE operator because i need join this resultset with others tables, but execution of select statement is breaking and i get:

PL/SQL: ORA-22905: cannot access rows from a non-nested table item

declare

  type my_emp_table_type is table of TESTM%rowtype index by binary_integer;

  myEmpTable  my_emp_table_type;

  vCount number;

begin

myEmpTable(1).id := 10;

myEmpTable(2).id := 10;

dbms_output.put_line(myEmpTable(1).id);

select count(*) into vCount from table(myEmpTable);

end;

/


does it possible in pl/sql use %rowtype  with table operator?

m.

This post has been answered by BEDE on Jan 4 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 1 2018
Added on Jan 3 2018
5 comments
1,461 views