Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Urgent help with UTL_FILE
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 UsenetReceived on Mon Nov 24 1997 - 00:00:00 CST
![]() |
![]() |