Output file and exit; [message #37992] |
Tue, 12 March 2002 21:38 |
Stephanie
Messages: 5 Registered: March 2002
|
Junior Member |
|
|
Hi,
the query finds the record from the table "listzert", where efaell = sysdate +7.
The problem:
although a data record is to be produced an output file is to be created.
Otherwise the query can be terminated (> exit).
The code:
declare
cursor c_lz is
select * from listzert
where trunc(efaell) = trunc(sysdate+7);
begin
dbms_output.enable(100000);
for r_lz in c_lz loop
dbms_output.put_line(r_lz.deponent);
dbms_output.new_line;
end loop;
end;
/
commit;
Thanks, Stephanie
|
|
|
Re: Output file and exit; [message #37994 is a reply to message #37992] |
Wed, 13 March 2002 00:38 |
Pratibha
Messages: 29 Registered: November 2001
|
Junior Member |
|
|
Hi
Your problem is not clear, what is the problem in the code? is it not displaying properly? or u want to write the output to a file?
if u want to write the displayed output to a file, then
u have to make use of a utility-utl_file.
Pls. explain your problem properly:
Bye
|
|
|
Upps! >>> exit [message #37998 is a reply to message #37992] |
Wed, 13 March 2002 00:57 |
Stephanie
Messages: 5 Registered: March 2002
|
Junior Member |
|
|
Hi,
when the condition is wrong:
How can I exit the Query and NO Output File will be created?
When the condition is okay -> Output in a file
Thanks,
Stephanie
|
|
|