Re: Sqlload; can I do math during the upload?
Date: 13 Jul 2002 21:20:36 -0700
Message-ID: <92eeeff0.0207132020.26be6da4_at_posting.google.com>
Bill Thorsteinson <billthor_at_yahoo.com> wrote in message news:<nkr0ju0i35ne7foqe0v507p81f95pp5o5h_at_4ax.com>...
> On Sat, 13 Jul 2002 11:46:42 -0500, "David Van Zandt" <dvanzandt_at_iquest.net>
> wrote:
>
> >I need to start with an Excel-generated CSV file, multiply an input column
> >variable by a constant, and out-put only five out of perhaps twenty source
> >columns. For example, the table would be an extract of columns 3,6,4, the
> >string "xyz", and column 5 * 85%.
> >
> >While reading the same input record, I need a second row created but with
> >string "zyx" and column 10 * .123.
> >
> >Then they want the results saved back in Excel, but that's the easy part.
> >
> >I'd appreciate any suggestions: this one's a tad harder than the manual's
> >examples. TIA.
> >
> Look at the models for performing SQL during insert. I don't think you can
> use direct path. You need at least Oracle 8i to skip columns in SQL*Load.
>
> I usually use a perl script to do this kind of processing. This looks like a
> very simple filter script.
>
> /Bill
Another idea would be to read your file via UTL_FILE and do your math/logic in PLSQL.
//Rauf Sarwar Received on Sun Jul 14 2002 - 06:20:36 CEST