How to write the CSV command in SQL?

Showing Answers 1 - 4 of 4 Answers

Prashant Amburle

  • Nov 4th, 2006
 

try below wiil resolve the problemspool c:a.txtselect tname||','||tabtype from tab;spool offopen a.txt

  Was this answer useful?  Yes

Spool the out put to text file as follows.

SET HEADING OFF;
SET FEEDBACK OFF;
SPOOL EXAMPLE.TXT
SELECT EMPNO || ','||ENAME||','||SAL FROM EMP;
SPOOL OFF;
SET FEEDBACK ON;
SET HEADING ON;


  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions