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 - 4 of 4 Answers
Related Answered Questions
Related Open Questions
ORA-01756: quoted string not properly terminated
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
Related Answered Questions
Related Open Questions