Ana C. Dent wrote:
> Glen A Stromquist wrote:
>> 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
>>
> "proc_name" is the name of the file containing the code.
> You do NOT have a "PROCEDURE" called "PROC_NAME".
I should have been more clear - "proc_name" is just in place of both what I
called the .sql script, as well as what I called the stored procedure when
I tried to compile it. For the purpose of this post I just substituted
"proc_name" in place of what my actual sql script is and what I called the
procedure.
Received on Fri May 02 2003 - 20:40:46 CDT