你这个是不是sql server 的存储过程呀,怎么里面还有go呢,搞不懂!不过参数又像是oracle的!

解决方案 »

  1.   


    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;
    /
      

  2.   

    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;
      

  3.   

    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类型的了
      

  4.   

    回楼上:
    还是出现以下错误:
    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
      

  5.   

    回lialin(阿林):
    你的疑惑正确,我是用pl/sql编译的..
      

  6.   

    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;
      

  7.   

    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;
      

  8.   

    为什么它老是出错在第一行呢?
    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
    各位认为呢?
      

  9.   

    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;
      

  10.   

    楼主参考一下ORACLE中存储过程的写法
      

  11.   

    看看Oracle pl/sql的语法吧,怎么看,怎么觉得是sql server^_^