Home » SQL & PL/SQL » SQL & PL/SQL » incorrect number of arguments for default constructor
incorrect number of arguments for default constructor [message #427438] Thu, 22 October 2009 10:55 Go to next message
apondike
Messages: 1
Registered: October 2009
Location: wellingborough
Junior Member

hey, was trying to insert values into my object array and it's not working, here's my code,

create type contact_type as object (
home varchar2(50),
uni varchar2(50),
work varchar2(50));
/

create type contact_varray_type as varray(50) of contact_type;

create table student
(student_id number(5),
surname varchar2(25),
contact contact_varray_type);

insert into student (student_id, surname)
values (10000, 'brown');

UPDATE student SET contact = contact_varray_type
(contact_type (22, 'Fir tree street', 'Northampton', 'NN1 1NN'),
contact_type (2, 'Oak road', 'Bristol', 'BB1 3TR'),
contact_type (8, 'Apple', 'Close Northampton', 'NN3 8UU'));
where student_id=10000;

i have manipulated this code he whole afternoon but am getting no where, please help,
the error message is 'incorrect number of arguments for default constructor'. i dont understand this at all
Emily
Re: incorrect number of arguments for default constructor [message #427451 is a reply to message #427438] Thu, 22 October 2009 12:42 Go to previous message
joy_division
Messages: 4617
Registered: February 2005
Location: East Coast USA
Senior Member
Your object has 3 elements, your update statement 4.
Previous Topic: Trigger for Update
Next Topic: replace
Goto Forum:
  


Current Time: Thu Sep 29 17:34:01 CDT 2016

Total time taken to generate the page: 0.12923 seconds