日期:2014-05-17  浏览次数:21170 次

ora 创建存储过程报错
SQL code

create or replace
PROCEDURE "P_PXPAPER_HIS_INSERT"
(    
  PARAM_HIS_ID IN OUT VARCHAR2,
    PARAM_SCORE IN NUMBER := NULL,
    PARAM_NUMBER IN NUMBER := NULL,
    PARAM_PAPER_ID IN VARCHAR2 := NULL,
    PARAM_USERID IN VARCHAR2 := NULL,
    PARAM_MEMO IN VARCHAR2 := NULL,
    PARAM_CREATE_TIME IN DATE := SYSDATE  
)
AS
BEGIN   
 IF ISNULLOREMPTY(PARAM_HIS_ID)=1 THEN
    SELECT GET_CURRENT_SERVER_ID || '-' || "SEQ_PXPAPER_HIS".NEXTVAL INTO PARAM_HIS_ID FROM DUAL;
 ELSE
    --保持原来值
    PARAM_HIS_ID:=PARAM_HIS_ID;
 END IF;
 INSERT INTO "PXPAPER_HIS"(
    "HIS_ID","SCORE","NUMBER","PAPER_ID","USERID","MEMO","CREATE_TIME"
 ) VALUES (
    PARAM_HIS_ID,PARAM_SCORE,PARAM_NUMBER,PARAM_PAPER_ID,PARAM_USERID,PARAM_MEMO,PARAM_CREATE_TIME
 );

END;

/


create or replace
PROCEDURE "P_PXPAPER_HIS_DELETE"
(
    PARAM_HIS_ID VARCHAR2
)    
AS
BEGIN
    DELETE FROM "PXPAPER_HIS"
    WHERE
        "HIS_ID" = PARAM_HIS_ID;
END;

/





错误信息:ORA-24344: success with compilation error

Procedure execution failed
ORA-06550: line 1, column 38:
PLS-00905: object VIVE_WM.P_PXPAPER_HIS_INSERT is invalid
ORA-06550: line 1, column 28:
PL/SQL: Statement ignored

查询时间: 0.047ms

帮帮忙呗,很郁闷,不知道怎么回事

------解决方案--------------------
你是sqlserver转ORACLE ?

DELETE FROM "PXPAPER_HIS"
WHERE
"HIS_ID" = PARAM_HIS_ID;
改成
DELETE "PXPAPER_HIS"
WHERE
"HIS_ID" = PARAM_HIS_ID;

------解决方案--------------------
把过程名上面的引号去掉!