Home » SQL & PL/SQL » SQL & PL/SQL » How to write a data file (simple flat file) using PL/SQL List
icon1.gif  How to write a data file (simple flat file) using PL/SQL List [message #184461] Wed, 26 July 2006 11:28 Go to next message
islam
Messages: 1
Registered: July 2006
Location: New Jersey
Junior Member

I have a PL/SQL list with certain columns and values in it.

I want to write the data from this PL/SQL List into a simple Flat File.

Now one way to do this is, I should iterate on PL/SQL List and write the records one by one in data/flat file (using UTIL functions).

Is there any way in PL/SQL using which I can write the data from PL/SQL to data file in one go?
Re: How to write a data file (simple flat file) using PL/SQL List [message #184578 is a reply to message #184461] Thu, 27 July 2006 02:34 Go to previous messageGo to next message
frank.svs
Messages: 162
Registered: February 2006
Senior Member

Follow this link

http://www.adp-gmbh.ch/ora/plsql/utl_file.html

Re: How to write a data file (simple flat file) using PL/SQL List [message #184579 is a reply to message #184578] Thu, 27 July 2006 02:41 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
I think the OP was asking for a way of doing it other than Utl_File....

I can't think of another way of doing it that's significantly different.
If you've got less than 32k of data, you could format it up into one big string and then write that out, but that's using Utl_file to do the writing.

You could create a Pro*C external procedure and get that to step through the pl/sql list and write it out with printf, but that really is using a linear accelerator to crack a nut.

Basically, I think you're stuck with one row at a time.
Previous Topic: Re-Order a table
Next Topic: sending email thru PL/SQL ..
Goto Forum:
  


Current Time: Thu Dec 08 18:42:12 CST 2016

Total time taken to generate the page: 0.07806 seconds