这段Oracle代码错误在哪?怎么改?

create or replace procedure cunchu
(COL0 int,COL1 int,COL2 int,COL3 int,COL4 nvarchar2(4000),COL5 nvarchar2(4000),COL6 nvarchar2(4000),COL7 nvarchar2(4000),COL8 int,COL9 int,COL10 int,COL11 nvarchar2(4000))
as

Begin

CREATE TABLE temp
(
FACCOUNTID VARCHAR2 (132) , FACCOUNTNAME VARCHAR2 (768) ,
FACCOUNTNUMBER VARCHAR2 (240) , FACCOUNTDC INT, FNUMBER0 VARCHAR2 (240),
FLONGNUMBER0 VARCHAR2 (600) , FID0 VARCHAR2 (132),
FNAME0 VARCHAR2 (765) ,FBEGINBALANCEDEBITFOR DECIMAL (38, 4), FBEGINBALANCECREDITFOR DECIMAL
(38, 4),
FDEBITFOR DECIMAL (38, 4), FCREDITFOR DECIMAL (38, 4), FYEARDEBITFOR DECIMAL (38, 4),
FYEARCREDITFOR DECIMAL (38, 4),
FENDBALANCEDEBITFOR DECIMAL (38, 4), FENDBALANCECREDITFOR DECIMAL (38, 4), FLEVEL INT, FISLEAF
INT,
FORDERNUMBER VARCHAR2 (600)
);
/

CREATE TABLE temp1 (FNumber0 VARCHAR2 (720) , FLongNumber0 VARCHAR2 (1800) ,
FID0 VARCHAR2 (396) , FName0 VARCHAR2 (2295), FaccountNumber VARCHAR2 (720) ,
FaccountName VARCHAR2 (2304) , FaccountID VARCHAR2 (396) , faccountdc INT,
FBEGINBALANCEDEBITFOR DECIMAL (38, 4), FBEGINBALANCECREDITFOR DECIMAL (38, 4), FDEBITFOR
DECIMAL (38, 4), FCREDITFOR DECIMAL (38, 4),
FYEARDEBITFOR DECIMAL (38, 4), FYEARCREDITFOR DECIMAL (38, 4), FENDBALANCEDEBITFOR DECIMAL
(38, 4), FENDBALANCECREDITFOR DECIMAL (38, 4),
FLevel INT, FIsLeaf INT, FOrderNumber VARCHAR2 (1800));

/
declare P0 int:=COL0;P1 int:=COL1;P2 int:=COL2;P3 int:=COL3;
P4 nvarchar2(4000):=COL4;P5 nvarchar2(4000):=COL5;
P6 nvarchar2(4000):=COL6;P7 nvarchar2(4000):=COL7;
P8 int:=COL8;P9 int:=COL9;P10 int:=COL10;P11 nvarchar2(4000):=COL11;

begin
select * from dual;

end;
/
select * from temp1;
/
drop table temp;
drop table temp1;
/
end;

查看全部
zilingmushi
zilingmushi
2017/07/21 06:17
  • as
  • select
  • oracle
  • 点赞
  • 收藏
  • 回答
    私信

3个回复