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

Home -> Community -> Usenet -> c.d.o.misc -> problem on Oracle 8 and objects

problem on Oracle 8 and objects

From: Fabienne Dubos <fdubos_at_France.Sun.Com>
Date: Mon, 20 Jul 1998 11:24:17 +0200
Message-ID: <35B30CC1.2599@France.Sun.Com>


Hello,

        I'm working on Oracle 8, and I've some problems :

  1. I've installed Oracle v8.0.4 When I ask for options : select * from v$option;
		They say to me :
			. partition
			. objects : FALSE

		How I can install these functionnalities on Oracle 8.0.4 ???



	Then for the moment ... I'm back on Oracle 8.0.3 !!!

	And Here have some problems with objects and varrays :

		2. I can't insert datas in a table created with a 
		new object type, just look at my file :

--

        MEMBER FUNCTION age return NUMBER,

        ORDER MEMBER FUNCTION map_fonct return INTEGER,

        PRAGMA RESTRICT_REFERENCES (age, RNDS, WNDS, WNPS) )
/

CREATE or REPLACE TYPE BODY personne_t AS

        MEMBER FUNCTION age RETURN NUMBER IS
                compteur        NUMBER;

        begin
                compteur := 5;
                return compteur;
        end;

--
--
        MAP MEMBER FUNCTION map_fonct  RETURN INTEGER IS

-- ORDER MEMBER FUNCTION map_fonct RETURN INTEGER IS
begin return 0; end;

end;
--
--

/
---> Everything's good !!!


--
--

DROP TABLE employes
/
CREATE TABLE employes
(

        num_emp         number(4) PRIMARY KEY,
        personne        personne_t,
        num_dep         number(3)

)
/  

-----> Everything's good !!!


INSERT into employes VALUES

(       1234,           -- num_emp
        personne_t (    -- personne
                'dupond',       -- nom
                'jean',         -- prenom
                adresse_t       -- adresse
                        (3,                     -- numero
                        'rue de la liberte',    -- rue
                        'aswded',               -- ville
                        74568                   -- codep
                        ),
                '01-Jan-1900'   -- daten
                   ),
        123             -- num_dep

)  

/  

--

 -----> Everything's BAD !!!


	Oracle says to me : coulum personne.adresse.codep 
	is unknown 

		WHAT'S WRONG IN MY EXAMPLE ?????






		3. Unfortunaltely .. I've tried to use varray !!!
		(What a bad day !!!)



--

--
--

CREATE or REPLACE TYPE g_telephone AS VARRAY(2)

        OF telephone_t
/
--
--
-----> Everything's good !!!


DROP TABLE annuaire
/
--

CREATE TABLE annuaire
(

        nom     varchar2(10),
        prenom  varchar2(10),
        tel_num g_telephone

)
/
--
--
-----> Everything's good !!!

INSERT INTO annuaire values
(

        'dupond',       -- nom
        'jean',         -- prenom
        g_telephone (
                telephone_t (
                        1234,5678
                            )    
                    )

)
/

 -----> Everything's BAD !!!


	Oracle says to me : I can't insert datas of that type
	Then I've tried


INSERT INTO annuaire values
(

        'dupond',       -- nom
        'jean',         -- prenom
        g_telephone (
                        1234,5678
                    )

)
/

        Same .. thing


		Can you help me PLEASE :-<<<<<<
	=============================================

	I just ask to you an example of those new kind
	of types .. which works (I haven't found it in Oracle
	documentation .... 




With lot of Thanks ... Received on Mon Jul 20 1998 - 04:24:17 CDT

Original text of this message

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