Message-Id: <10600.115573@fatcity.com> From: Lyall Barbour Date: Fri, 25 Aug 2000 09:53:30 -0700 Subject: Re: *Help* - -about View & Type --=====================_244192940==_.ALT Content-Type: text/plain; charset="us-ascii"; format=flowed Do you need this OBJECT IDENTIFIER clause in the creation of the view? I've never used the Make_Ref function, but I see this little clause everywhere I've found information on Make_Ref. From Oracle Sql Reference manual. Purpose MAKE_REF creates a REF to a row of an object view or a row in an object table whose object identifier is primary key based. Example CREATE TABLE emp (eno NUMBER, ename VARCHAR2(20), salary NUMBER, PRIMARY KEY (eno, ename)); CREATE TYPE emp_type AS OBJECT (eno NUMBER, ename CHAR(20), salary NUMBER); CREATE VIEW emp_view OF emp_type WITH OBJECT IDENTIFIER (eno, ename) ******************** AS SELECT * FROM emp; SELECT MAKE_REF(emp_view, 1, 'jack') FROM DUAL; See Also: Oracle8i Application Developer's Guide - Fundamentals for more information about object views. I would think someone else on the list could be of more help. Lyall Barbour At 06:38 AM 8/25/00 -0800, you wrote: >Dear Gurus, > >I'm compiling the script (generated from Designer) for following views : > >=============================================== >CREATE OR REPLACE VIEW UNIT_TYPES_T_V ( ID, >CODE, DESCRIPTION, CREATED_BY, DATE_CREATED, >MODIFIED_BY, DATE_MODIFIED ) >AS >SELECT ut.id, ut.code, ut.description, ut.created_by, ut.date_created, >ut.modified_by, ut.date_modified >FROM UNIT_TYPES UT >/ > > >>>>>>>successful >View created. >================================================= >CREATE OR REPLACE VIEW UNITS_T_V ( ID, >CODE, DESCRIPTION, CREATED_BY, DATE_CREATED, >MODIFIED_BY, DATE_MODIFIED, UT ) AS SELECT unt.id, unt.code, >unt.description, unt.created_by, >unt.date_created, unt.modified_by, unt.date_modified, >Make_Ref(UNIT_TYPES_T_V, >unt.ut_id) >FROM UNITS UNT >/ > >>>>>>generate error >, unt.modified_by, unt.date_modified, Make_Ref(UNIT_TYPES_T_V, > * >ERROR at line 4: >ORA-22970: name does not correspond to an object view > > >Could some body tell me and help me what to do / to check on this...... >? >I'm very thankful for your helps.... > >Thank you very much. >-- >Author: Syaugi H.S > INET: Syaugi@psn.co.id > >Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 >San Diego, California -- Public Internet access / Mailing Lists >-------------------------------------------------------------------- >To REMOVE yourself from this mailing list, send an E-Mail message >to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in >the message BODY, include a line containing: UNSUB ORACLE-L >(or the name of mailing list you want to be removed from). You may >also send the HELP command for other information (like subscribing). --=====================_244192940==_.ALT Content-Type: text/html; charset="us-ascii" Do you need this OBJECT IDENTIFIER clause in the creation of the view?
I've never used the Make_Ref function, but I see this little clause everywhere I've found information on Make_Ref. 

From Oracle Sql Reference manual.

Purpose
MAKE_REF creates a REF to a row of an object view or a row in an object table
whose object identifier is primary key based.

Example
CREATE TABLE emp (eno NUMBER, ename VARCHAR2(20),
salary NUMBER, PRIMARY KEY (eno, ename));

CREATE TYPE emp_type AS OBJECT
(eno NUMBER, ename CHAR(20), salary NUMBER);

CREATE VIEW emp_view OF emp_type

WITH OBJECT IDENTIFIER (eno, ename)   ********************

AS SELECT * FROM emp;
SELECT MAKE_REF(emp_view, 1, 'jack') FROM DUAL;

See Also: Oracle8i Application Developer’s Guide - Fundamentals for
more information about object views.

I would think someone else on the list could be of more help.

Lyall Barbour

At 06:38 AM 8/25/00 -0800, you wrote:
Dear Gurus,

I'm compiling the script (generated from Designer) for following views :

===============================================
CREATE OR REPLACE VIEW UNIT_TYPES_T_V ( ID,
CODE, DESCRIPTION, CREATED_BY, DATE_CREATED,
MODIFIED_BY, DATE_MODIFIED )
AS
SELECT ut.id, ut.code, ut.description, ut.created_by, ut.date_created,
ut.modified_by, ut.date_modified
FROM UNIT_TYPES UT
/

>>>>>>>successful
View created.
=================================================
CREATE OR REPLACE VIEW UNITS_T_V ( ID,
CODE, DESCRIPTION, CREATED_BY, DATE_CREATED,
MODIFIED_BY, DATE_MODIFIED, UT ) AS SELECT unt.id, unt.code,
unt.description, unt.created_by,
unt.date_created, unt.modified_by, unt.date_modified, 
Make_Ref(UNIT_TYPES_T_V,
unt.ut_id)
FROM UNITS UNT
/
>>>>>>generate error
, unt.modified_by, unt.date_modified,  Make_Ref(UNIT_TYPES_T_V,
                                                *
ERROR at line 4:
ORA-22970: name does not correspond to an object view


Could some body tell me and help me what to do / to check on this......
?
I'm very thankful for your helps....

Thank you very much.
--
Author: Syaugi H.S
  INET: Syaugi@psn.co.id

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You