我的错误:
ORA-06550:第3行第3栏: PLS-00103:遇到符号"文件结束"期待以下之一:
符号";"取代了"文件结尾"继续。
这是我尝试运行的脚本
BEGIN
BPT.INSERT_CODES('TEST2','TEST', 'TESTING', 'ABC',234);
END;/
相关存储过程
CREATE OR REPLACE PROCEDURE BPT.Insert_Codes (
str_Table_Name IN BPT.Code_Table_Name.Table_Name%TYPE,
str_Code IN VARCHAR2,
str_Desc IN VARCHAR2,
str_User_ID IN BPT.City.User_Id_Ent_By%Type,
int_User_Seq IN Number) IS
/*******************************************Declaration******************************** **********/
int_Code_seq Number(7);
str_Column_Prefix VarChar2(22);
str_Query VarChar2(800);
/*************************************** execution ************************************************/
BEGIN
/* Get the column prefix */
SELECT Column_Prefix
INTO str_Column_Prefix
FROM BPT.TEST3
WHERE Table_Name = 'CITY';
/* get next code sequence */
str_Query := 'BPT.'||str_column_prefix||'seq';
int_Code_seq := BPT.COMMON_FUNCTIONS.GET_NEXT_VAL(str_Query);
/* Insert Entries Into Code Tables */
str_Query := 'INSERT INTO BPT.'||str_Table_Name;
str_Query := CONCAT(str_Query, ' (' || str_Column_Prefix ||'
, ');
str_Query := CONCAT(str_Query, '_Seq, ');
str_Query := CONCAT(str_Query, str_Column_Prefix || '_CODE, ');
str_Query := CONCAT(str_Query, str_Column_Prefix || '_DESCRIPTION, ');
str_Query := CONCAT(str_Query, 'User_Id_Ent_By, ');
str_Query := CONCAT(str_Query, 'User_Seq_Ent_By, ');
str_Query := CONCAT(str_Query, 'Dt_Ent) ');
str_Query := CONCAT(str_Query, 'VALUES('|| int_Code_seq || ', ');
str_Query := CONCAT(str_Query, str_Code || ', ');
str_Query := CONCAT(str_Query, str_Desc ||', ');
str_Query := CONCAT(str_Query, ''''|| str_User_Id ||''',');
str_Query := CONCAT(str_Query, int_User_Seq || ',');
str_Query := CONCAT(str_Query, ' SYSDATE )');
EXECUTE IMMEDIATE str_Query;
COMMIT;
END INSERT_Codes;
我已经看到类似于我的问题,通常是使用保留字或缺少分号的人。老实说,我也看不到任何一个!非常感谢您的帮助。这让我疯了两天。