Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> help with this simple proc?

help with this simple proc?

From: Glen A Stromquist <glen_stromquist_at_no.spam.yahoo.com>
Date: Fri, 02 May 2003 22:12:50 GMT
Message-ID: <C3Csa.21238$yv1.1637867@news2.telusplanet.net>


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
delete from table2;
commit;
insert into table2
select * from (select col1,col2 from
table1 where col3 is not null
order by dbms_random.value) where rownum <= %num1; commit;
end;


It runs fine from sqlplus when I enter "@proc_name", but wont run if I enter " exec proc_name" nor will it compile. As you can see I haven't spent a lot of time writing PL/SQL - can anyone help here?

TIA Received on Fri May 02 2003 - 17:12:50 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US