I would like to turn the following in to a procedure that will prompt
the user for input.
Is this allowed in procedures?
accept query prompt 'Enter query to perform unload: '
accept filename prompt 'Enter output file name: '
accept delimit prompt 'Enter delimiter character: '
declare
query varchar2(200);
filename varchar2(20);
delimit char(1);
l_rows number;
begin
query := '&query';
filename := '&filename';
delimit := '&delimit';
l_rows := dump_csv( '&query','&delimit','UTL_FILE_DIR','&filename');
dbms_output.put_line( to_char(l_rows) || ' rows extracted to ascii file'
);
end;
Oracle LazyDBA home page