When I export data from SQL Developer GUI, setting
left enclosure: ",
right enclosure: ", and
Encoding: UTF8, I get data exactly the way that I need it for processing in Python.
However, when I attempt to do the same thing from SQL Plus, I get very different results. Here are my settings (file.sql is simply a select statement):
export ORACLE_SID=MYSID sqlplus / as sysdba <<EOF conn myUser/myPass set heading off set termout off set trimout off set newpage none set pages 0 set feedback off set echo off set verify off set trimspool on set sqlprompt "" set colsep "," set linesize 32767 @/home/username/file.sql exit EOF
How can I export the data from SQL Plus so that it is exactly like that from SQL Developer? As an FYI, when I run
file -i myfile.csv I get "application/octet-stream; charset=binary", while from SQL Plus the file is some form of "ASCII" (and for some tables "ISO").