Skip to content

Instantly share code, notes, and snippets.

@krisrice
Created February 24, 2021 13:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krisrice/8e27c027bffbf37739f22d2dd6cc15d8 to your computer and use it in GitHub Desktop.
Save krisrice/8e27c027bffbf37739f22d2dd6cc15d8 to your computer and use it in GitHub Desktop.
script
// issue the sql
var binds = {}
var ret = util.executeReturnList('select help_text,page_name from APEX_APPLICATION_PAGES where rownum=1 and help_text is not null',binds);
// loop the results
for (i = 0; i < ret.length; i++) {
// debug is nice
ctx.write( ret[i].PATH+ "\n");
// get the CLOB stream
// get the path/file handle to write to
var path = java.nio.file.FileSystems.getDefault().getPath(ret[i].PAGE_NAME + "_help.txt");
// dump the file stream to the file
java.nio.file.Files.copy( ret[i].HELP_TEXT.getAsciiStream(),path);
blobStream.close();
}
/
!ls *help.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment