Skip to content
Advertisement

Oracle Object-Relational – PLS-00122 error

Type declaration:

I am trying to insert the REF of the newly created POST_TY into the nested table SCRIVE of AUTORE_TY but it gives me this error:

Advertisement

Answer

You can solve it using:

I’m not exactly sure what the issue was but it did not appear to work populating the DI_AUTORE collection in the PL/SQL scope but if you move the creation into the INSERT statement which is an SQL (and not PL/SQL) statement then it works.

Similarly, you can’t create a REF to the PL/SQL post variable; you need to create it referencing a table row.

db<>fiddle here

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement