SQL*PLUS - spool output to file. [message #329475] |
Wed, 25 June 2008 09:14 |
ashwin_tampa
Messages: 40 Registered: October 2005
|
Member |
|
|
Hello guys,
I have a problem on SQL*PLUS spool output.
If my SELECT statement does not return any data
I don't want to spool output into file. I dont want to
generate empty file. Is it possible?
Here is my case :
SET SERVEROUTPUT ON SIZE 1000000
SPOOL C:\TEST.TXT
SELECT * FROM T1
WHERE T1.ID IS NOT NULL;
SPOOL OFF;
So if above statement do not returns any data
I do not want to generate empty file 'C:\TEST.TXT'.
Is there any way to stop this?
Appreciate your insights!
|
|
|
|
|