Skip to content

Instantly share code, notes, and snippets.

@nicolascarrascob
Last active September 30, 2020 04:26
Show Gist options
  • Save nicolascarrascob/ad0c3ef17fb5a59ddeef4b0a4c073361 to your computer and use it in GitHub Desktop.
Save nicolascarrascob/ad0c3ef17fb5a59ddeef4b0a4c073361 to your computer and use it in GitHub Desktop.
Oracle Script to export a CLOB column to a txt file
CREATE DIRECTORY DUMP_SOURCES AS 'C:\temp\';
BEGIN
FOR rec IN (
select id, xml
FROM table
)
LOOP
DBMS_XSLPROCESSOR.clob2file(rec.xml, 'DUMP_SOURCES', rec.id ||'.txt');
END LOOP;
END;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment