-- Create directory
create or replace directory EXPIMP_DIR as 'E:\hira';
--PL/SQL Block
DECLARE
v_file UTL_FILE.FILE_TYPE;
BEGIN
v_file := UTL_FILE.FOPEN(location => 'EXPIMP_DIR',
filename => 'New_Card_Test.txt',
open_mode => 'w',
max_linesize => 32767);
FOR cur_rec IN (select sl,data_desc from tt order by sl) LOOP
UTL_FILE.PUT_LINE(v_file,cur_rec.data_desc);
END LOOP;
UTL_FILE.FCLOSE(v_file);
EXCEPTION
WHEN OTHERS THEN UTL_FILE.FCLOSE(v_file); RAISE;
END;
Muhammad Abdul Qaium is a Database Engineer/Oracle Apex Developer/BI Developer (in Connecticut, USA) who is an Oracle Certified Cloud Architect Professional, OCI Autonomous DB specialist as well as Oracle Business Intelligence Foundation Suite 11g Certified Implementation Specialist with extensive expertise in Database design , PL/SQL, Oracle Apex, Microsoft SSIS, ETL, Power BI, Qlik Sense, BI Publisher, Jasper Report, OBIEE. Contact: qaiuminfo@gmail.com
Search This Blog
Subscribe to:
Post Comments (Atom)
Java to Oracle database Connection Using JDBC
Oracle database. // Java Program to Establish Connection // in JDBC with Oracle Database // Importing database import java.sql.*; // Import...
-
Search by keyword from Oracle Database Objects. select owner, type, name, line, text from dba_source where 1 = 1 and text like '%TEXT Y...
-
We Can Export Application Components individually from Oracle Apex. Application > Shared Components > Export Application Compo...
No comments:
Post a Comment