Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Urgent help with UTL_FILE

Urgent help with UTL_FILE

From: <pawanputra_at_hotmail.com>
Date: 1997/11/24
Message-ID: <880398034.15742@dejanews.com>#1/1

Friends,

        May be I am asking a trivial question but I need your help. I have to create FLAT files from ORACLE tables very frequently. At present I use SPOOL command to write to a flat file. Understand there is UTL_FILE package in PL/SQL 2.3 & later (?) which is used to write to operating System files. I do not have manuals with me so can't refer. I will appreciate if one of you could pl help me.

Requirement :

	Table TEST has 1 million records.
	description of table TEST

	emp_id		varchar2(10),
	fname		varchar2(20),
	lname		varchar2(20),
	address		varchar2(30),
	zip		number(10),
	Phone 		number(10)

.....
.....
status Char(2)

I want to create a comma delimited flat file and write the file in a particular directory on the UNIX box ( say /flat1/month). All the VARCHAR and CHAR fields are required to be RPADed and the NUMBER fields are required to be LPADed. Thanks for all your help.

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Mon Nov 24 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US