-
Please check and help
SQL> CREATE OR REPLACE TYPE ADDRESS_TY AS OBJECT
2 (STREET VARCHAR2(20),CITY VARCHAR2(20),STATE VARCHAR2(12));
3 /
Type created.
SQL> CREATE OR REPLACE TYPE PERSON_TY AS OBJECT
2 (NAME VARCHAR2(20),ADDRESS ADDRESS_TY);
3 /
Type created.
SQL> CREATE TABLE CUSTOMER
2 (ID NUMBER(3),PERSON PERSON_TY);
Table created.
SQL> CREATE VIEW CUST_OV (CUSTOMER_ID,PERSON) AS
2 SELECT ID,PERSON_TY(NAME,
ADDRESS_TY(STREET,CITY,STATE)) FROM CUSTOMER;
SELECT ID,PERSON_TY(NAME,
ADDRESS_TY(STREET,CITY,STATE)) FROM CUSTOMER
*
ERROR at line 2:
ORA-00904: invalid column name
Thanx
-
CREATE VIEW CUST_OV (CUSTOMER_ID,PERSON)
AS
SELECT ID, PERSON
FROM CUSTOMER
/
-
Thanx a lot Julian
Could I insert values in Normal way ?
Thanx Again
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|