Glenstr
05-02-2003, 07:00 PM
I am trying to write a simple proc to call from an access form to populate a table with random entries. It is as follows:
=========================
declare
num1 number;
begin
insert into table2
select * from (select col1,col2 from
table1 where col3 is not null
order by dbms_random.value) where rownum <= %num1;
end;
===========================
It runs fine from sqlplus with an "SQL:>@procedure", but wont run if I enter "SQL:>exec procedure" nor will it compile.
As you can see I havent spent a lot of time in PL/SQL - can anyone help here?
TIA
=========================
declare
num1 number;
begin
insert into table2
select * from (select col1,col2 from
table1 where col3 is not null
order by dbms_random.value) where rownum <= %num1;
end;
===========================
It runs fine from sqlplus with an "SQL:>@procedure", but wont run if I enter "SQL:>exec procedure" nor will it compile.
As you can see I havent spent a lot of time in PL/SQL - can anyone help here?
TIA