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

Home -> Community -> Mailing Lists -> Oracle-L -> Need A Split File Option

Need A Split File Option

From: Tracy Rahmlow <tracy.rahmlow_at_aexp.com>
Date: Thu, 13 Nov 2003 11:24:25 -0800
Message-ID: <F001.005D6937.20031113112425@fatcity.com>


A developer in our shop would like to read an input file and based on some field values for each record in the file split them into multiple files. The output files will be used by a 3rd party package for processing. (the package does not need the oracle database) For example:

Input File:

record a: WI auto ...
record b: WI auto ...
record c: NY auto ...
record d: YY home ...


Output file WI_AUTO:
record a: WI auto ...
record b: WI auto ...

Output file NY_AUTO:
record c: NY auto ...

Error file:
record d: YY home ... (no entry in the criteria lookup table to pick up this record therefore send it to an error file)

Their solution is to load an oracle table with the input file. An additional table would contain the criteria and the name of the output file to write to. They would write a procedure to read the criteria and input table and utilize the utl_file package to create the output files. There may be 50+ output files initially and likely will grow over time. My gut tells me that this does not belong in the database, rather we should be able to split the file using C or a utility such as syncsort (which we do not have). We are currently at 8.1.7.4 on AIX 4.3.3. Is there a more elegant solution and what would it be??? Are there any open source unix utilities that may help? Thanks

American Express made the following
 annotations on 11/13/2003 12:20:23 PM



     "This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."



--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Tracy Rahmlow
  INET: tracy.rahmlow_at_aexp.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Nov 13 2003 - 13:24:25 CST

Original text of this message

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