
To that end, it is not possible to repeatedly prompt in a loop. Update: Fortunately, you can work this around by generaing a list of separate sequential statements accepting independent inputs: 22:38:59 conn value for var1: aĩ dbms_output.put_line('insert into test_table values(''&var'||i||''', sysdate) ') ġ insert into test_table values('&var1', sysdate) Ģ insert into test_table values('&var2', sysdate) ģ* insert into test_table values('&var3', sysdate) Ģ2:40:04 after all substitution variables are parsed and substituted(by the client) a final command, query or pl/sq block is sent to the database engine for execution.

INSERT INTO TEST_TABLE VALUES('&slno5',SYSDATE) INSERT INTO TEST_TABLE VALUES('&slno4',SYSDATE) INSERT INTO TEST_TABLE VALUES('&slno3',SYSDATE) INSERT INTO TEST_TABLE VALUES('&slno2',SYSDATE) Probably the only thing you can do here is INSERT INTO TEST_TABLE VALUES('&slno1',SYSDATE)

to make it take another input, but these are also sqlplus, not pl/sql commands, so you won't be able to invoke them in a loop, You have to call undefine &slno or accept slno. It is a substitution variable - an sql*plus feature - and it doesn't work this way.
