2012-05-21 53 views
1

我試圖運行在APEX以下PLSQL腳本運行腳本時:PLS-00103在APEX

DECLARE 
    total NUMBER; 
BEGIN 
    SELECT COUNT(*) 
    INTO total 
    FROM one_table; 

    FOR i IN 0:100 --This is line 8 
    LOOP 
     INSERT INTO other_table(id, column_a) SELECT id + i * total, column_a FROM one_table; 
    END LOOP; 
    COMMIT; 
END; 

而且我得到這個錯誤:

ORA-06550: line 8, column 15: PLS-00103: Encountered the symbol "" when expecting one of the following: * & - +/at mod remainder rem .. <an exponent (**)> || multiset The symbol ".." was substituted for "" to continue.' 

回答

5

我不認爲這是合法的語法:

FOR i IN 0:100 

我想你的意思:

FOR i IN 0..100