Friday, January 17, 2014
DBMS_XSLPROCESSOR.CLOB2FILE Example Script to Write a CLOB data to file
In our current project, we have a requirement for writing a data
stored in CLOB column to a file. We found a standard ORACLE API DBMS_XSLPROCESSOR.CLOB2FILE
In this post, we have tried to
explain the same API with an example. We hope it helps.
API Specification:
DBMS_XSLPROCESSOR.CLOB2FILE(
cl IN CLOB,
flocation IN VARCHAR2,
fname IN VARCHAR2,
CSID IN NUMBER:=0);
Script:
SET SERVEROUTPUT ON:
DECLARE
-- CLOB data
lv_clob CLOB DEFAULT 'This is a example
testing by SHAREORACLEAPPS';
-- Database directory for a physical location
lv_utl_file_directory VARCHAR2 (100) DEFAULT 'TEST_DB_DIRECTORY';
-- Output Filename
lv_file_name VARCHAR2 (100) DEFAULT 'TESTFILE.txt';
BEGIN
DBMS_XSLPROCESSOR.clob2file (lv_clob,
lv_utl_file_directory,
lv_file_name
);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Error :' || SQLERRM);
END;
Do you think this Article is useful?
Subscribe to:
Post Comments (Atom)
Disclaimer
The ideas, thoughts and concepts expressed here are my own. They, in no way reflect those of my employer or any other organization/client that I am associated. The articles presented doesn't imply to any particular organization or client and are meant only for knowledge Sharing purpose. The articles can't be reproduced or copied without the Owner's knowledge or permission.

5 Responses to “DBMS_XSLPROCESSOR.CLOB2FILE Example Script to Write a CLOB data to file”
March 13, 2014 at 10:01 PM
August 17, 2014 at 11:26 PM
I am Sridevi Koduru, Senior Oracle Apps Trainer at Oracleappstechnical.com With 8 Yrs Exp on Oracle Apps and 13 Yrs IT Exp Providing Online Training on Oracle Apps Technical, Oracle Apps Financial Functional, Oracle Apps SCM, Oracle Apps HRMS, Oracle Financial for Indian Localization, SQL, PL/SQL and D2K. I have Provided Training for 500+ Professionals Most of them are Working in Real Time now.
Contact for (One to One Personal Online Training) on Oracle Apps Technical, Oracle Apps Financial Functional, Oracle Apps SCM, Oracle Apps HRMS, Oracle Financial for Indian Localization, SQL, PL/SQL and D2K at training@oracleappstechnical.com | sridevikoduru@oracleappstechnical.com | +91-9581017828 | http://www.oracleappstechnical.com
Linkedin profile - http://in.linkedin.com/pub/sridevi-koduru/8b/76a/9b8/
August 17, 2014 at 11:27 PM
December 29, 2018 at 8:02 PM
Thanks and Regards. Oracle Apps R12 Training Videos at affordable cost. please check oracleappstechnical.com
May 13, 2020 at 3:56 AM
Good material for quick reference
Post a Comment