Ok. Got it. When creating tab1 changed the create line to CREATE TABLE tab1 OF sales;
Oracle: how to get an object reference?
Frage
I have a sales object and a table (tab1) of sales objects. I want to create a second table (tab2) that contains references to the objects in tab1.
CREATE TYPE sales AS OBJECT
( marca NUMBER(4),
nume VARCHAR2(40),
orasp VARCHAR2(20),
nrv NUMBER(4)
);
/
DROP TABLE tab1 CASCADE CONSTRAINTS;
CREATE TABLE tab1
(
vanzator sales
);
I try to get the object ref, as so but hit the PL/SQL ORA-00904 "p" invalid identifier
.
What am I doing wrong? Please help.
DECLARE CURSOR c_pers_ref IS SELECT REF (p) FROM tab1 p; rec_vanz_ref REF t2;
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow