Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: *Help* - -about View & Type

Re: *Help* - -about View & Type

From: Lyall Barbour <lbarbour_at_stanford.edu>
Date: Fri, 25 Aug 2000 09:53:30 -0700
Message-Id: <10600.115573@fatcity.com>

--=====================_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_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==_.ALT
Content-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.&nbsp; <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 an
object 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 (eno
NUMBER, ename VARCHAR2(20),<br>
salary NUMBER, PRIMARY KEY (eno, ename));<br> <br>
CREATE TYPE emp_type AS OBJECT<br>
(eno NUMBER, ename CHAR(20), salary NUMBER);<br> <br>
CREATE VIEW emp_view OF emp_type<br>
<br>
WITH OBJECT IDENTIFIER (eno, ename)&nbsp;&nbsp;
********************<br>

<br>
AS SELECT * FROM emp;<br>
SELECT MAKE_REF(emp_view, 1, 'jack') FROM DUAL;<br> <br>
</font><b>See Also: </b><font face="Times New Roman, Times"><i>Oracle8i Application Developerís Guide - Fundamentals </i>for<br> more information about object views.<br> <br>
</font>I would think someone else on the list could be of more help.<br>
<br>
Lyall Barbour<br>
<br>
At 06:38 AM 8/25/00 -0800, you wrote:<br> <blockquote type=cite cite>Dear Gurus,<br> <br>
I'm compiling the script (generated from Designer) for following views :<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>
AS <br>
SELECT ut.id, ut.code, ut.description, ut.created_by, ut.date_created, <br>
ut.modified_by, ut.date_modified<br>
FROM UNIT_TYPES UT<br>
/<br>
<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;successful<br> View created.<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>
unt.date_created, unt.modified_by, unt.date_modified,&nbsp; <br> Make_Ref(UNIT_TYPES_T_V,<br>
unt.ut_id)<br>
FROM UNITS UNT<br>
/<br>
&gt;&gt;&gt;&gt;&gt;&gt;generate error <br> , unt.modified_by, unt.date_modified,&nbsp; Make_Ref(UNIT_TYPES_T_V,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *<br>
ERROR at line 4:<br>
ORA-22970: name does not correspond to an object view<br> <br>
<br>
Could some body tell me and help me what to do / to check on this......<br>
?<br>
I'm very thankful for your helps....<br> <br>
Thank you very much.<br>
-- <br>
Author: Syaugi H.S<br>
&nbsp; INET: Syaugi_at_psn.co.id<br>
<br>
Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) 538-5051&nbsp; FAX: (858) 538-5051<br>
San Diego, California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet access / Mailing Lists<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).&nbsp; You Received on Fri Aug 25 2000 - 11:53:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US