SQL Developer parameterized query and parameterized output

360 views Asked by At

I have this query in SQL Developer running on a Oracle 11g XE database:

variable PDL VARCHAR2(256 BYTE);  
set feedback off 
set verify off 
begin
  :PDL := '&1'; 
end;
/ 
set feedback on 
spool c:\lexmark\spool.txt; 
select PRINTERNAME, SERVERNAME, DOCUMENT, PAGES, updatetime
from DESKTOP_JOBS
where SERVERNAME = :PDL
and updatetime BETWEEN TO_DATE ('01/04/2015', 'dd/mm/yyyy')
  AND TO_DATE ('31/05/2015', 'dd/mm/yyyy');

I would like to get data from a .txt file and put the output in a .txt with the same name, in order do have different spool for each query.

I've searched the net for suggestions but so far no luck. Do you have any ideas?

0

There are 0 answers