Insert correctly in VARRAY of TYPE OBJECT

0

Recently I'm working on SQL Developer and 'messing around' with the creation of data types. For now this is the idea:

CREATE OR REPLACE TYPE actividad_t AS OBJECT(
    nombre varchar2(50),
    contenido varchar2(50),
    plantilla varchar2(50),
    nota float); 

CREATE OR REPLACE TYPE vActividad_t AS VARRAY(5) OF actividad_t;

CREATE OR REPLACE TYPE asig_pers_act_t AS OBJECT(
    dni varchar2(50),
    id_asig int,
    actividades vActividad_t,
    MEMBER FUNCTION calc_media RETURN FLOAT,
    MEMBER PROCEDURE mostrar_datos (SELF IN OUT NOCOPY asig_pers_act_t));

CREATE TABLE Asig_Pers_Act OF asig_pers_act_t;

INSERT INTO Asig_Pers_Act(dni, id_asig, actividades) VALUES
('11223344A', 3, vActividad_t(
  ('Actividad1', 'Contenido1', 'Plantilla1', 7),
  ('Actividad2', 'Contenido2', 'Plantilla2', 8.5),
  ('Actividad3', 'Contenido3', 'Plantilla3', 5),
  ('Actividad4', 'Contenido4', 'Plantilla4', 6.5),
  ('Actividad5', 'Contenido5', 'Plantilla5', 9)));

The issue is that when performing the insert the Oracle compiler throws the following error:

Informe de error -
Error SQL: ORA-00907: falta el paréntesis derecho
00907. 00000 -  "missing right parenthesis"
*Cause:    
*Action:

Does anyone give me a hand to know how to correctly insert? Greetings.

    
asked by Abraham Godoy Sánchez 30.11.2018 в 19:59
source

0 answers