Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: *Help* - -about View & Type
--=====================_244192940==_.ALTContent-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_at_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_at_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==_.ALTContent-Type: text/html; charset="us-ascii"
<html>
Do you need this OBJECT IDENTIFIER clause in the creation of the
view?<br>
I've never used the Make_Ref function, but I see this little clause
everywhere I've found information on Make_Ref. <br>
<br>
From Oracle Sql Reference manual.<br>
<br> <font size=3><b>Purpose<br> </font></b><font face="Courier, Courier">MAKE_REF </font><font face="Times New Roman, Times">creates a REF to a row of anobject view or a row in an object table<br> whose object identifier is primary key based.<br>
<br> </font><font size=3><b>Example<br> </font></b><font face="Courier, Courier" size=2>CREATE TABLE emp (enoNUMBER, ename VARCHAR2(20),<br>
********************<br>
===============================================<br>CREATE OR REPLACE VIEW UNIT_TYPES_T_V ( ID, <br> CODE, DESCRIPTION, CREATED_BY, DATE_CREATED, <br> MODIFIED_BY, DATE_MODIFIED ) <br>
=================================================<br>CREATE OR REPLACE VIEW UNITS_T_V ( ID, <br> CODE, DESCRIPTION, CREATED_BY, DATE_CREATED, <br> MODIFIED_BY, DATE_MODIFIED, UT ) AS SELECT unt.id, unt.code,<br> unt.description, unt.created_by, <br>
--------------------------------------------------------------------<br>To REMOVE yourself from this mailing list, send an E-Mail message<br> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in<br> the message BODY, include a line containing: UNSUB ORACLE-L<br> (or the name of mailing list you want to be removed from). You Received on Fri Aug 25 2000 - 11:53:30 CDT