How to generate a delimiter in spool output (Excel .csv files)

In order to generate a delimited file output, you need to concatenate columns using the desired delimiter i.e. comma:

select empno|| ‘,’||ename||’&’||mgr from X;

Other option is using:
SQL> set colsep ‘,’
SQL> spool c:\testexcel.csv
SQL> select * from emp;

Change some of the default SQL*Plus parameters, that will be garbage for Excel:

If some columns are empty, be aware to include the delimiter, too:

New Functional Expert for your Help

Like to inform all followers of blog , that we are adding a great functional expert in our panel. He will be answering all your functional queries ( i.e. in Functional and Supply Chain Modules ) through Email and also in case your need any more help through other communication channels like IM, Gtalk, Skype , Audio or Video Meetings etc.

Moreover we are looking Expert in other areas of Oracle ERP. In case you know any epxert who can help , please refer.

Will post more once we have Our new Expert ready to publish his artilces and publish his contacts.

thanks – Shiv