Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> selecting from all_source
Hi there could you please help me with this problem.
attached is the procedure which creates a file for given package body and
given user.
The owner of this procedure has DBA privilage.
BUT it does not select and records, this is only for package body.
Is there any way that I could do this.
Thanks tom
Procedure COMP_PACKAGE_BODY(v_filename in varchar2 default null,
v_user in varchar2 default null, v_pack_name in varchar2 default null )IS
begin
V_FileHandle := UTL_FILE.FOPEN(v_FileDir,v_filename,'w'); for c1 in
select
a.text
from
all_source a
where
a.OWNER = upper(v_user) and a.name = v_pack_name and a.TYPE = 'PACKAGE BODY' order by a.line) loop --UTL_FILE.PUT(v_FileHandle,c1_rec.text); dbms_output.put_line('hi'); utl_file.put(v_FileHandle,c1.text);end loop;