我尝试通过 apex online 运行以下代码
DECLARE
t1 VARCHAR(44);
t2 VARCHAR(11);
c VARCHAR(3);
BEGIN
t1:='061,065,059,067,064,066,071,111,110,121,077.';
t2:=NULL;
FOR I IN LENGTH(t1)/4
loop
c:=SUBSTR(t1,((LENGTH(t1)/4),3);
t2:=t2||CHR(TO_NUMBER(c));
end loop;
DBMS_OUTPUT.PUT_LINE(t2);
END;
但是出现以下错误
ORA-06550: line 9, column 2:
PLS-00103: Encountered the symbol "LOOP" when expecting one of the following:
* & - + / at mod remainder rem .. <an exponent (**)> ||
谢谢大家,我解决了第二个错误,实际上
c:=SUBSTR(s1,1+((LENGTH(s1)/4)-I)*4,3);