When exporting to CSV in Oracle SQL Developer, null values are replaced with "". I want them to be exported as the string null. Is this configurable anywhere?
Example of what is wished:
"STARTDATE", "ENDDATE"
"2017-03-16 00:00:00", null
instead of:
"STARTDATE", "ENDDATE"
"2017-03-16 00:00:00", ""
Exporting is performed by running a query, right-click on the data shown in the grid and select "Export..."
1 Answer 1
Just set the below in your session, as you would do in SQL*Plus:
set null "null"
Note: this will not affect how NULLs are displayed in the data grid (you can set that from the menu: Tools - Preferences - Database - Advanced - Display Null Value As), but it affects the exported CSV.
-
Learn something new every day :) +1Philᵀᴹ– Philᵀᴹ2017年03月14日 13:38:56 +00:00Commented Mar 14, 2017 at 13:38
-
1For some odd reason, I was running a 1.5.x version of Oracle SQL Developer for which 'set null "null"' returned an 'SQLPLUS Command Skipped:' error. With the latest version (4.1.5), it works flawlessly. Thank you.Hans Deragon– Hans Deragon2017年03月14日 14:53:54 +00:00Commented Mar 14, 2017 at 14:53
Explore related questions
See similar questions with these tags.