Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
SQL错误:ORA-02315:默认构造函数的参数数不正确_Sql_Oracle_Plsql - Fatal编程技术网

SQL错误:ORA-02315:默认构造函数的参数数不正确

SQL错误:ORA-02315:默认构造函数的参数数不正确,sql,oracle,plsql,Sql,Oracle,Plsql,我想弄明白为什么这是一个错误 这是我的对象类型 CREATE type address_typ as object ( street varchar2(60), city varchar2(19), pCode varchar2(9) ) Final; / / / 这些是我的表插入查询 insert into person_table values(employee_typ('NI001',Name_type('Mrs ','Alison ','Smi

我想弄明白为什么这是一个错误

这是我的对象类型

CREATE type address_typ as object (
   street varchar2(60),
   city varchar2(19),
    pCode varchar2(9)
   )
   Final;
/

/

/

这些是我的表插入查询

insert into person_table values(employee_typ('NI001',Name_type('Mrs      ','Alison ','Smith '),address_typ('Dart','Edinburgh', 'EH105TT'),Phone_array('01312125555','07705623443','07907812345'),,to_date('01/02/2016','dd-mm-yyyy'),'Head',50000,(select ref(b) from Branch_table b where b.bid='901')));

insert into person_table values(employee_typ('NI010',Name_type('Mr','John','William'),address_typ('New','Edinburgh', 'EH24AB'),Phone_array('01312031990','07902314551','07701234567'),,to_date('04/03/2007','dd-mm-yyyy'),'Manager',40000,(select ref(b) from Branch_table b where b.bid='901')));

insert into person_table values(employee_typ('NI120',Name_type('Mr','Mark','Slack'),address_typ('Old','Edinburgh', 'EH94BB'),Phone_array('01312102211','',''),,to_date('01/02/2009','dd-mm-yyyy'),'Accountant',30000,(select ref(b) from Branch_table b where b.bid='901')));

insert into person_table values(employee_typ('NI810',Name_type('Mr','Jack','Smith '),address_typ('Adam','Edinburgh', 'EH16EA'),Phone_array('01311112223','0781209890',''),,to_date('05/02/2008','dd-mm-yyyy'),'Project Leader ',35000,(select ref(b) from Branch_table b where b.bid='908')));

insert into person_table values(employee_typ('NI234',Name_type('Mr ','Muneeb ','Khan'),address_typ('5432 Castlehill',' Edinburgh', '  EH1 2ND'),Phone_array('01312224535','0745679945','07468452746'),,to_date('20/09/1982','dd-mm-yyyy'),'Project Leader ',35000,(select ref(b) from Branch_table b where b.bid='901')));

insert into person_table values(employee_typ('NI256',Name_type('Mrs ','Stephanie ','Fagan '),address_typ('276 Cockburn Street',' Edinburgh', '  EH1 1BP'),Phone_array('01334545454','0776988453','07775744847'),,to_date('14/06/1984','dd-mm-yyyy'),'Cashier ',15000,(select ref(b) from Branch_table b where b.bid='901')));

insert into person_table values(employee_typ('NI453',Name_type('Mr','Steven ','Ojay'),address_typ('40 Hutchesontown Court','Glasgow ', '  G5 0SX'),Phone_array('01414567865','0777457457','07564634645'),,to_date('19/07/1985','dd-mm-yyyy'),'Manager',40000,(select ref(b) from Branch_table b where b.bid='902')));

insert into person_table values(employee_typ('NI343',Name_type('Miss','Linsday ','Reid '),address_typ('40 Carlton Place','Glasgow ', '  G5 9TW'),Phone_array('01418693048','0756748454','07474757479'),,to_date('19/01/1988','dd-mm-yyyy'),'Project Leader ',35000,(select ref(b) from Branch_table b where b.bid='902')));

insert into person_table values(employee_typ('NI896',Name_type('Mr','Stuart ','Reid '),address_typ('451 Lawmoor Street','Glasgow ', '  G54 3EJ'),Phone_array('01418363484','0777373464','07575757779'),,to_date('17/08/1988','dd-mm-yyyy'),'Accountant ',30000,(select ref(b) from Branch_table b where b.bid='902')));

insert into person_table values(employee_typ('NI645',Name_type('Miss ','Eveyln ','Ford '),address_typ('197 Cumberland Street','Glasgow ', '  G5 0SW'),Phone_array('01418569235','0773638293','07565656389'),,to_date('07/10/1988','dd-mm-yyyy'),'Cashier ',15000,(select ref(b) from Branch_table b where b.bid='902')));

insert into person_table values(employee_typ('NI543',Name_type('Mrs ','Rebbeca ','Duke '),address_typ('33 Queen Elizabeth Gardens','Glasgow ', '  G5 0UH'),Phone_array('01410593032','0736373748','07564749699'),,to_date('06/11/1989','dd-mm-yyyy'),'Manager ',40000,(select ref(b) from Branch_table b where b.bid='903')));

insert into person_table values(employee_typ('NI359',Name_type('Miss','Lauren ','Steve'),address_typ('Elmfoot Grove','Glasgow ', '  G5 0HF'),Phone_array('01419582039','0736484848','07464747468'),,to_date('23/05/1991','dd-mm-yyyy'),'Accountant ',30000,(select ref(b) from Branch_table b where b.bid='903')));

insert into person_table values(employee_typ('NI880',Name_type('Mr','Laurance ','Builder '),address_typ('232 Paisley Road','Glasgow ', '  G5 8NG'),Phone_array('01415034893','0777363737','07773856960'),,to_date('08/02/1994','dd-mm-yyyy'),'Project Leader ',35000,(select ref(b) from Branch_table b where b.bid='903')));

insert into person_table values(employee_typ('NI063',Name_type('Mr','Micheal','Jackson'),address_typ('31C Errol Gardens','Glasgow ', '  G5 0RA'),Phone_array('01415834349','0736383738','07773457374'),,to_date('11/07/1996','dd-mm-yyyy'),'Cashier ',15000,(select ref(b) from Branch_table b where b.bid='903')));

insert into person_table values(employee_typ('NI850',Name_type('Mrs ','Rebecca ','Tony'),address_typ('37 Carnoustie Street','Glasgow ', '  G5 8PN'),Phone_array('0141i8349349','0793834949','07583838835'),,to_date('26/12/1996','dd-mm-yyyy'),'Head ',50000,(select ref(b) from Branch_table b where b.bid='904')));

问题是当你引用或插入相同的东西时,每种类型的参数的数量

您定义
地址类型
->
人员类型
人员类型
->
员工类型
,并使用
分支机构类型
(您在问题中的定义在哪里?)

检查链接


创建类型分支类型作为最终对象(投标编号、地址类型、电话阵列)/我也有这个很抱歉我没有把它添加到问题中没有问题,你是否检查了链接,它是否对你有帮助。理想情况下,定义中的参数顺序和参数数量会导致错误。亲爱的,我检查了你的insert语句,你没有提到“名称类型”、“电话数组”类型和“人员表”表结构。检查一些东西你遗漏了或没有,然后平meAjay感谢回复我已经检查了这个如果你想我可以给你发送完整的脚本
CREATE type employee_typ under person_typ
(
emp_ID varchar2(11),
joinDate date,
position varchar2(14),
salary number,    
branch_r ref branch_typ
)
Final;
insert into person_table values(employee_typ('NI001',Name_type('Mrs      ','Alison ','Smith '),address_typ('Dart','Edinburgh', 'EH105TT'),Phone_array('01312125555','07705623443','07907812345'),,to_date('01/02/2016','dd-mm-yyyy'),'Head',50000,(select ref(b) from Branch_table b where b.bid='901')));

insert into person_table values(employee_typ('NI010',Name_type('Mr','John','William'),address_typ('New','Edinburgh', 'EH24AB'),Phone_array('01312031990','07902314551','07701234567'),,to_date('04/03/2007','dd-mm-yyyy'),'Manager',40000,(select ref(b) from Branch_table b where b.bid='901')));

insert into person_table values(employee_typ('NI120',Name_type('Mr','Mark','Slack'),address_typ('Old','Edinburgh', 'EH94BB'),Phone_array('01312102211','',''),,to_date('01/02/2009','dd-mm-yyyy'),'Accountant',30000,(select ref(b) from Branch_table b where b.bid='901')));

insert into person_table values(employee_typ('NI810',Name_type('Mr','Jack','Smith '),address_typ('Adam','Edinburgh', 'EH16EA'),Phone_array('01311112223','0781209890',''),,to_date('05/02/2008','dd-mm-yyyy'),'Project Leader ',35000,(select ref(b) from Branch_table b where b.bid='908')));

insert into person_table values(employee_typ('NI234',Name_type('Mr ','Muneeb ','Khan'),address_typ('5432 Castlehill',' Edinburgh', '  EH1 2ND'),Phone_array('01312224535','0745679945','07468452746'),,to_date('20/09/1982','dd-mm-yyyy'),'Project Leader ',35000,(select ref(b) from Branch_table b where b.bid='901')));

insert into person_table values(employee_typ('NI256',Name_type('Mrs ','Stephanie ','Fagan '),address_typ('276 Cockburn Street',' Edinburgh', '  EH1 1BP'),Phone_array('01334545454','0776988453','07775744847'),,to_date('14/06/1984','dd-mm-yyyy'),'Cashier ',15000,(select ref(b) from Branch_table b where b.bid='901')));

insert into person_table values(employee_typ('NI453',Name_type('Mr','Steven ','Ojay'),address_typ('40 Hutchesontown Court','Glasgow ', '  G5 0SX'),Phone_array('01414567865','0777457457','07564634645'),,to_date('19/07/1985','dd-mm-yyyy'),'Manager',40000,(select ref(b) from Branch_table b where b.bid='902')));

insert into person_table values(employee_typ('NI343',Name_type('Miss','Linsday ','Reid '),address_typ('40 Carlton Place','Glasgow ', '  G5 9TW'),Phone_array('01418693048','0756748454','07474757479'),,to_date('19/01/1988','dd-mm-yyyy'),'Project Leader ',35000,(select ref(b) from Branch_table b where b.bid='902')));

insert into person_table values(employee_typ('NI896',Name_type('Mr','Stuart ','Reid '),address_typ('451 Lawmoor Street','Glasgow ', '  G54 3EJ'),Phone_array('01418363484','0777373464','07575757779'),,to_date('17/08/1988','dd-mm-yyyy'),'Accountant ',30000,(select ref(b) from Branch_table b where b.bid='902')));

insert into person_table values(employee_typ('NI645',Name_type('Miss ','Eveyln ','Ford '),address_typ('197 Cumberland Street','Glasgow ', '  G5 0SW'),Phone_array('01418569235','0773638293','07565656389'),,to_date('07/10/1988','dd-mm-yyyy'),'Cashier ',15000,(select ref(b) from Branch_table b where b.bid='902')));

insert into person_table values(employee_typ('NI543',Name_type('Mrs ','Rebbeca ','Duke '),address_typ('33 Queen Elizabeth Gardens','Glasgow ', '  G5 0UH'),Phone_array('01410593032','0736373748','07564749699'),,to_date('06/11/1989','dd-mm-yyyy'),'Manager ',40000,(select ref(b) from Branch_table b where b.bid='903')));

insert into person_table values(employee_typ('NI359',Name_type('Miss','Lauren ','Steve'),address_typ('Elmfoot Grove','Glasgow ', '  G5 0HF'),Phone_array('01419582039','0736484848','07464747468'),,to_date('23/05/1991','dd-mm-yyyy'),'Accountant ',30000,(select ref(b) from Branch_table b where b.bid='903')));

insert into person_table values(employee_typ('NI880',Name_type('Mr','Laurance ','Builder '),address_typ('232 Paisley Road','Glasgow ', '  G5 8NG'),Phone_array('01415034893','0777363737','07773856960'),,to_date('08/02/1994','dd-mm-yyyy'),'Project Leader ',35000,(select ref(b) from Branch_table b where b.bid='903')));

insert into person_table values(employee_typ('NI063',Name_type('Mr','Micheal','Jackson'),address_typ('31C Errol Gardens','Glasgow ', '  G5 0RA'),Phone_array('01415834349','0736383738','07773457374'),,to_date('11/07/1996','dd-mm-yyyy'),'Cashier ',15000,(select ref(b) from Branch_table b where b.bid='903')));

insert into person_table values(employee_typ('NI850',Name_type('Mrs ','Rebecca ','Tony'),address_typ('37 Carnoustie Street','Glasgow ', '  G5 8PN'),Phone_array('0141i8349349','0793834949','07583838835'),,to_date('26/12/1996','dd-mm-yyyy'),'Head ',50000,(select ref(b) from Branch_table b where b.bid='904')));
CREATE type employee_typ under person_typ
(
emp_ID varchar2(11),
joinDate date,
position varchar2(14),
salary number,    
branch_r ref branch_typ  /*where you define*/
)
Final;