I'm trying this simple FOR loop statement but it keeps giving me the following error. Any help is greatly appreciated!!!!! Thank you so much.
Error report:
ORA-06550: line 5, column 18:
PLS-00382: expression is of wrong type
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
/*QUERY*/
--Creating a temp table
CREATE TABLE zzTab(
num NUMBER
);
--Inserting values from 1 to 10 in the table
BEGIN
FOR i IN
(
SELECT to_number(ROWNUM) i
FROM dual
CONNECT BY ROWNUM <=10
)
LOOP
INSERT INTO zztab (
num
)
SELECT 7*i num
from dual;
END LOOP;
END;