Dear All,
I have a shell script that selects from teh database and spools into a csv file.
The issue I am facing here is that my data in the csv file is distorted.
The first row is blank, second row has headings, third row is again blank and where the data is a bit lengthy it is slipping to the next line which I don't want.
Can this be rectified somehow?
my script looks like this.
set feedback off;
set def off;
set head off
spool ${LOGDIR}extract.csv
SELECT 'NAME_PATH' || ',' || 'CODE' from dual
UNION ALL
select function1(p.id) || ',' || function2(p.id)
from table1 p
where p.type_id = 3345
start with id = 5698
connect by prior p.id = p.parent_id;
spool off;
Here function1 and function2 return text which is quite lengthy (>150 characters).
Thanks.