>From "http://infoboerse.doag.de/mirror/frank/faqloadr.htm":

<begin_quote>
What utilities does Oracle supply to download data to a flat file?

Oracle doesn't supply any data unload tools. However, you can use SQL*Plus
to select and format your data and then spool it to a file: 
        set echo off newpage 0 space 0 pagesize 0 feed off head off
trimspool on
        spool oradata.txt
        select col1 || ',' || col2 || ',' || col3
        from   tab1
        where  col2 = 'XYZ';
        spool off

Alternatively use the UTL_FILE PL/SQL package: 
        rem Remember to update initSID.ora, utl_file_dir='c:\oradata'
parameter
        declare
           fp utl_file.file_type;
        begin
           fp := utl_file.fopen('c:\oradata','tab1.txt','w');
           utl_file.putf(fp, '%s, %s\n', 'TextField', 55);
           utl_file.fclose(fp);
        end;
        /

You might also want to investigate third party tools like TOAD or ManageIT
Fast Unloader from CA.
<end_quote>

HTH,
Dan

-----Original Message-----
From: Chris Hamer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 19, 2000 8:18 AM
To: CF-Server
Subject: RE: Oracle outputting a file


Is there a SQL unLoader?

I need to create a file that can be downloaded from the database.

Here is the scenario:
A contact manager db online -
A user runs executes a page that displays site/contact information from the
database.
The user then use a dynamic sql generator to filter the records. (anywhere
from 100 to 15,000)
After filtering to the records they desire, they click a link that writes a
csv, and allows the file to be downloaded.

Currently, I am using <cffile> to write the file.
Problem is: the cf server/iis server is tied up processing for 10 - 15
minutes or more writing the larger files.

My goal is to reduce the time by (hopefully) utilizing the database to write
the file instead of the cf server.

I have the same application running with mssql server, I use the xp_cmdshell
to call the bcp program to write the files, it works great. I am trying to
repeat this with oracle.


We are using oracle 8i

Please help.


Chris Hamer
Web Development
ImageServe, Inc.
http://www.imageserve.com
[EMAIL PROTECTED]


----------------------------------------------------------------------------
--
To unsubscribe, send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body or visit the list page at www.houseoffusion.com


The information contained in this message is privileged and confidential.  It is 
intended solely for the use of the named recipient.  If you are not the intended 
recipient, you are hereby notified that any disclosure, copying, distribution, or use 
of the contents of this transmission is strictly prohibited.  If you receive this 
message in error, please notify the sender immediately.  Thank you.
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with 
'unsubscribe' in the body or visit the list page at www.houseoffusion.com

Reply via email to