Re: Help with data conversion???

From: Randy Dewoolfson <randyd_at_cais.com>
Date: 1995/09/02
Message-ID: <42a0hj$p6b_at_zippy.cais.net>#1/1


GIL QUIHUIZ (pdsc_at_netcom.com) wrote:
: What method is best to convert a 190Mb file containing 1100 byte ASCII
: blocks (separated by hex 0A0D - LFCR), and store it into an Oracle7 data
: base??? The file is created elsewhere and they will not change it.
:
: In addition, if-then-else decisions need to be made on each record. For
: example, convert a string YYJJJ julian date to Oracle date field. Some
: records maybe discarded entirely based on certain decisions.
:
: Also, I only have Oracle and Unix at my disposal. Please send me email
: with any helpful suggestions regarding manipulation of Unix files with
: Oracle tools.
:
: Thanks!
:
:

The date conversion is not really an if-then-else decision, but whether you want that record or not is... If the logic is fairly complex, you can use Pro*C to read in the file, parse it, check your rules, then insert the record to your table(s).

Another option is to imbed (embed?) the rules for acceptability directly into the database, then use SQL*Loader to stuff the file into a table where these rules can move records to other error_holding, or non-error tables.

-- 
    ..uu.                                     ----------------------
  .?$" '?i     .                              I  Randy DeWoolfson  I
 .T^M  ._at_"    d9    .     f   ,.un.  b,    i  I--------------------I
 "  Z :#"    M `8   U    <  .dP"``"# `M   _at_"  I  randyd_at_cais.com   I
    &H?`    Xl _R   $5.  $  ?*    _at_   'P,#"   I--------------------I
  ,d#^*L   :RP'~$b  f`$L:M  Xf  .f'    dH`    I        ,\//.       I
    &  'M ,P    `E  M   "$  Mux~      n!`     I        |o o|       I
   dk   `h"       ' j     " y"       *~       I====oOO==(_)==Ooo===I
Received on Sat Sep 02 1995 - 00:00:00 CEST

Original text of this message