I have a series of queries that I want to output to CSV files. The only tool I have to query in the database is SQL Developer.
I can run each query and then use the Export dialog in SQL Developer to write them to files, but this is cumbersome, especially when you need to do this for multiple files every day.
This works for some people. Directly export a query to CSV using SQL Developer
But this does not work for me.
For example, if I try
spool "C:\Users\james.foreman\Downloads\Temp\myfile.csv" select distinct placement_type FROM jf_placements; spool off;
then in the output area of ββthe script SQL Developer I see
Unable to create SPOOL file C: \ Users \ james.foreman \ Downloads \ Temp \ myfile.csv
and although myfile.csv is created, there are no results. (There are two rows returned by the request.)
My first thought was that there was a write permission issue in C: \ Users \ james.foreman \ Downloads \ Temp but that doesn't seem to be the case, because if I delete the myfile.csv file and run SQL, the file myfile.csv will be recreated, but there is never anything in it.
So, I assume that this is a configuration problem, either with a Windows machine running SQL Developer, or with my SQL Developer. Where should I look for further research?
@Devolus's answer to the Procedure for exporting a table to several csv files includes the instruction "In the SQL Window, right-click β Change window in β Command window", but if I right-click on the SQL window, I do not see the parameter " Change window. "
(running Windows 7, SQL Developer version 4.0.2.15, build 15.21, database - Oracle 11.2)