Hi Guys,

This is a sql file that generates a csv through spool

set echo off
set wrap off
set HEADING ON
set VERIFY OFF
set FEEDBACK OFF
set RECSEP OFF
set PAGESIZE 0
set LINESIZE 100
set define ~
set TAB off
spool Rejected_Manufacturer.csv
select Manufacturer from (
select 'Manufacturer Code' as Manufacturer, 1 srno from dual
union
select distinct manufacturer_code as Manufacturer, 2 srno from
vistaar_plant_mfg where Upper(rejected) like Upper('%manufacturer_code%')
order by srno);
spool off
exit

Now this file generates a heading as "Manufacturer Code" when there is no
data.
Now i need to delete the file. if it contains only this heading. But if i
check the number of lines it displays more than one. i.e it is actually
appending some blank lines.

Please help me in this.

Regards,
Swapna

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to