I've tried some codes like these below:
select /*csv*/ * from users;
,
spool "C:/Users/Douglas/Desktop";
select /*csv*/ *
from users;
spool off;
AND
--CSV=C:\Users\dvferreira\Desktop\temp.csv
select * from users;
Is there anything else I can try?
PL/SQL Developer 15.0.0.2050
CodePudding user response:
Since SQL*Developer shares the same codebase as SQLCl, the SQLCl command SET SQLFORMAT works:
set sqlformat CSV
spool "c:\temp\out.csv"
select * from user_tables;
spool off
Then 'Run As Script'.
CodePudding user response:
PL/SQL Developer comment directives only take effect if you actually export the data. You still need to right-click on the header of the result grid, click Export Results, and then click either "CSV file" or "Excel file". Comment directives don't fully automate exports, but they at least save you a few clicks. See the PDF manual in Help --> User's Guide for more information about that feature.