DECLARE
SN VARCHAR2(50);
SN1 VARCHAR2(50);
SN2 VARCHAR2(50);
SET SN = (SELECT SER_NO FROM UPLOAD WHERE FILE_NAME='大堂经理.wav');
SET SN1=(SELECT SER_NO FROM UPLOAD WHERE FILE_NAME='大堂经理(粤).wav');
SET SN2= SN+'@'+SN1;
BEGIN
Insert into IQS.CP_POSITION (PID,POSTIONNAME,AUDIOFILEID,CREATOR,UPDATETIME,CREATETIME,AUDIOPLAYLANGUAGE,AUDIONAME) values ('4d2ca1e7-94c7-4b94-87de-9a425639307c','大堂经理',SN2,'ADMIN',sysdate,sysdate,SN,'大堂经理.wav@大堂经理(粤).wav');
END;
这样写执行会一直报错,之前没写过。求改正
报错如下:
在行 2 上开始执行命令时出错:
DECLARE
SN VARCHAR2(50);
SN1 VARCHAR2(50);
SN2 VARCHAR2(50);
SET SN=(SELECT SER_NO FROM UPLOAD WHERE FILE_NAME='大堂经理.wav');
SET SN1=(SELECT SER_NO FROM UPLOAD WHERE FILE_NAME='大堂经理(粤).wav');
SET SN2= SN+'@'+SN1;
BEGIN
Insert into IQS.CP_POSITION (PID,POSTIONNAME,AUDIOFILEID,CREATOR,UPDATETIME,CREATETIME,AUDIOPLAYLANGUAGE,AUDIONAME) values ('4d2ca1e7-94c7-4b94-87de-9a425639307c','大堂经理',SN2,'ADMIN',sysdate,sysdate,SN,'大堂经理.wav@大堂经理(粤).wav');
END;
错误报告:
ORA-06550: 第 5 行, 第 9 列:
PLS-00103: 出现符号 "="在需要下列之一时:
:= . ( @ % ; not
null range default character
ORA-06550: 第 5 行, 第 72 列:
PLS-00103: 出现符号 ";"在需要下列之一时:
) , and or
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
--友情转载