ORA-01756: quoted string not properly terminated

Hi
Can anyone explain what this mean?
I have practise PL/SQL about REF obj_type, my codes are:

CREATE or REPLACE TYPE home_type AS OBJECT (
street VARCHAR2(50), city VARCHAR2(20),
state VARCHAR2(20), zipcode VARCHAR2(6),
owner VARCHAR2(10)
);
/

CREATE TABLE homes OF home_type;
INSERT INTO homes VALUES ('300 Regina St', 'WATERLOO', 'ON', '010010', 'HFWANG');
INSERT INTO homes VALUES ('301 Regina St', 'WATERLOO', 'ON', '010010', 'MMWANG');
commit;


CREATE TABLE person (
id NUMBER(6) PRIMARY KEY,
name VARCHAR2(10),
addr REF home_type
);

INSERT INTO person SELECT 10, 'HFWANG', ref(p)
FROM homes p WHERE p.owner='HFWANG';

When I try to insert like the last sentense, the error comes out.

can anyone help me about this?
Thanks.

Questions by nernernini

Showing Answers 1 - 2 of 2 Answers

priti

  • Nov 11th, 2019
 

kindly let me know what do you want in result using ref cursor? here you ref cursor as a table which is not exists in system. that is what it is giving error

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions