try: create or replace procedure Addstock(Name in out type, Name in out type, ...) as a varchar(10); b int; c int; begin insert nsoa.ct_进仓单 (编号,数量,成品名称) values(a,b,c) update nsoa.ct_库存列表_类别 set 当前库存=当前库存+b,成品名称=成品名称+c where 编号=a end Addstock; /
create or replace procedure Addstock(Name in out type, Name in out type, ...) is begin a varchar(10), b int, c int as insert nsoa.ct_进仓单 (编号,数量,成品名称) values(a,b,c); update nsoa.ct_库存列表_类别 set 当前库存=concat(当前库存,b), 成品名称=constr(成品名称,c) where 编号=a; end Addstock;
create or replace procedure Addstock(Name in out type, Name in out type, ...) is begin a varchar(10), b int, c int as insert nsoa.ct_进仓单 (编号,数量,成品名称) values(a,b,c); update nsoa.ct_库存列表_类别 set 当前库存=当前库存+b, 成品名称=成品名称+c where 编号=a; end Addstock;不好意思刚才认为未varchar2类型的了
回楼上: 还是出现以下错误: Compilation errors for PROCEDURE SZM.ADDSTOCKError: PLS-00103: 出现符号 "."在需要下列之一时: <an identifier> <a double-quoted delimited-identifier> current Line: 1 Text: create or replace procedure Addstock(Name in out type, Name in out type, ...) is
回lialin(阿林): 你的疑惑正确,我是用pl/sql编译的..
create or replace procedure Addstock(Name in out type, Name in out type, ...) is a varchar(10); b int; c int; <<--变量放begin前面,并且用分号 begin --as <-----把这里的as去掉 insert into nsoa.ct_进仓单 (编号,数量,成品名称) values(a,b,c); <--加into update nsoa.ct_库存列表_类别 set 当前库存=当前库存+b, 成品名称=成品名称+c where 编号=a; end Addstock;
create or replace procedure Addstock(Name in out type, Name in out type, ...) is a varchar(10); b number; c number; begin insert nsoa.ct_进仓单 (编号,数量,成品名称) values(a,b,c); update nsoa.ct_库存列表_类别 set 当前库存=当前库存+b, 成品名称=成品名称+c where 编号=a; end Addstock;
为什么它老是出错在第一行呢? create or replace procedure Addstock(Name in out type, Name in out type, ...) is Compilation errors for PROCEDURE SZM.ADDSTOCKError: PLS-00103: 出现符号 "."在需要下列之一时: <an identifier> <a double-quoted delimited-identifier> current Line: 1 Text: create or replace procedure Addstock(Name in out type, Name in out type, ...) is 各位认为呢?
create or replace procedure Addstock(Name in out type, Name in out type, ...) as a varchar(10); b int; c int; begin insert nsoa.ct_进仓单 (编号,数量,成品名称) values(a,b,c) update nsoa.ct_库存列表_类别 set 当前库存=当前库存+b,成品名称=成品名称+c where 编号=a end Addstock;
try:
create or replace procedure Addstock(Name in out type, Name in out type, ...) as
a varchar(10);
b int;
c int;
begin
insert nsoa.ct_进仓单 (编号,数量,成品名称) values(a,b,c)
update nsoa.ct_库存列表_类别 set 当前库存=当前库存+b,成品名称=成品名称+c where 编号=a
end Addstock;
/
begin a varchar(10),
b int,
c int
as
insert nsoa.ct_进仓单 (编号,数量,成品名称) values(a,b,c);
update nsoa.ct_库存列表_类别 set 当前库存=concat(当前库存,b),
成品名称=constr(成品名称,c) where 编号=a;
end Addstock;
begin a varchar(10),
b int,
c int
as
insert nsoa.ct_进仓单 (编号,数量,成品名称) values(a,b,c);
update nsoa.ct_库存列表_类别 set 当前库存=当前库存+b,
成品名称=成品名称+c where 编号=a;
end Addstock;不好意思刚才认为未varchar2类型的了
还是出现以下错误:
Compilation errors for PROCEDURE SZM.ADDSTOCKError: PLS-00103: 出现符号 "."在需要下列之一时:
<an identifier>
<a double-quoted delimited-identifier> current
Line: 1
Text: create or replace procedure Addstock(Name in out type, Name in out type, ...) is
你的疑惑正确,我是用pl/sql编译的..
a varchar(10);
b int;
c int; <<--变量放begin前面,并且用分号
begin
--as <-----把这里的as去掉
insert into nsoa.ct_进仓单 (编号,数量,成品名称) values(a,b,c); <--加into
update nsoa.ct_库存列表_类别 set 当前库存=当前库存+b,
成品名称=成品名称+c where 编号=a;
end Addstock;
is
a varchar(10);
b number;
c number;
begin
insert nsoa.ct_进仓单 (编号,数量,成品名称) values(a,b,c);
update nsoa.ct_库存列表_类别 set 当前库存=当前库存+b,
成品名称=成品名称+c where 编号=a;
end Addstock;
create or replace procedure Addstock(Name in out type, Name in out type, ...) is
Compilation errors for PROCEDURE SZM.ADDSTOCKError: PLS-00103: 出现符号 "."在需要下列之一时:
<an identifier>
<a double-quoted delimited-identifier> current
Line: 1
Text: create or replace procedure Addstock(Name in out type, Name in out type, ...) is
各位认为呢?
a varchar(10);
b int;
c int;
begin
insert nsoa.ct_进仓单 (编号,数量,成品名称) values(a,b,c)
update nsoa.ct_库存列表_类别 set 当前库存=当前库存+b,成品名称=成品名称+c where 编号=a
end Addstock;