Exporting a CLOB to a text file using Oracle SQL Developer

前端 未结 5 1494
無奈伤痛
無奈伤痛 2020-12-05 15:25

I am using Oracle SQL Developer and trying to export a table to a CSV file. Some of the fields are CLOB fields, and in many cases the entries are truncated when the export

5条回答
  •  不思量自难忘°
    2020-12-05 16:06

    As Oracle SQL Developer is explicitly mentioned and "hack-ish type solutions" were encouraged (and in case somebody is still in need…):

    If a single statement is executed from a SQL Worksheet (in Oracle SQL Developer), the result is displayed as a table. After clicking the result table, use either keyboard shortcuts or the Edit menu to first mark the whole table and then to copy its content. Proceed to your text editor of choice. Paste. Save to a file. Hopefully done. ;-)

    Works even for CLOBs exceeding 4000 characters. Whether or not it actually helps, will very much depend on the CLOBs' actual content. Sometimes some SQL pre-processing might get you there…

    Alternatively try in the result table's local menu Export…. Going from there through the Excel 95-2003 format option might work (better than CSV or text/TSV).

    Please comment, if and as this requires adjustment / further detail.

提交回复
热议问题