我正在使用 11g 我有桌子
CREATE TABLE Agency
(
AgencyID int not null PRIMARY KEY,
AgencyName VARCHAR2(30) not null,
AgencyLtrCode VARCHAR2(10) not null,
IsActive VARCHAR2(3) DEFAULT 'yes'NOT NULL,
LastListSentData DATE DEFAULT SYSDATE ,
LetterSendDate DATE DEFAULT SYSDATE ,
CertificationDate DATE DEFAULT SYSDATE ,
CeresNo int,
AgencyAreaID int not null,
CONSTRAINT fk_Agency FOREIGN KEY (AgencyAreaID) REFERENCES AgencyArea(AriaID)
);
我使用过程在其中插入新记录
create or replace PROCEDURE insert_AGENCY_Procedure(
AGENCYID IN AGENCY.AGENCYID%TYPE,
AGENCYNAME IN AGENCY.AGENCYNAME%TYPE,
AGENCYLTRCODE IN AGENCY.AGENCYLTRCODE%TYPE,
ISACTIVE IN AGENCY.ISACTIVE%TYPE DEFAULT 'yes',
LASTLISTSENTDATA IN AGENCY.LASTLISTSENTDATA%TYPE DEFAULT SYSDATE,
LETTERSENDDATE IN AGENCY.LETTERSENDDATE%TYPE DEFAULT SYSDATE,
CERTIFICATIONDATE IN AGENCY.CERTIFICATIONDATE%TYPE DEFAULT SYSDATE,
CERESNO IN AGENCY.CERESNO%TYPE,
AGENCYAREAID IN AGENCY.AGENCYAREAID%TYPE)
IS BEGIN
INSERT INTO AGENCY("AGENCYID", "AGENCYNAME","AGENCYLTRCODE","ISACTIVE","LASTLISTSENTDATA","LETTERSENDDATE","CERTIFICATIONDATE","CERESNO","AGENCYAREAID")
VALUES (AGENCYID, AGENCYNAME,AGENCYLTRCODE,ISACTIVE,LASTLISTSENTDATA,LETTERSENDDATE,CERTIFICATIONDATE,CERESNO,AGENCYAREAID);
COMMIT;
END;
现在它抛出错误“第 17 行错误:PLS-00103:遇到符号“”“第 17 行只有 END;在上面
当我提交插入看起来像
BEGIN
insert_AGENCY_Procedure(9003,'Some Other Church', 'SomOTCh','no',10-10-2011,10/10/2011,10/10/2011,17,2 );
END;
它抛出错误
ORA-06550: line 2, column 4:
PLS-00306: wrong number or types of arguments in call to 'INSERT_AGENCY_PROCEDURE'
ORA-06550: line 2, column 4:
PL/SQL: Statement ignored
或其他插入
BEGIN
insert_AGENCY_Procedure(9003,'Some Other Church',SomOTCh',DEFAULT,DEFAULT,DEFAULT,DEFAULT,17,2 );
END;
它抛出错误
ORA-06550: line 2, column 64:
PLS-00103: Encountered the symbol "DEFAULT" when expecting one of the following:
( - + case mod new not null
问题是我的程序有什么问题?我试图解决这个问题但卡住了:(