Study unpack() in 'perldoc perlfunc'.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
----- Original Message -----
From: "Anurag Minocha" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 12, 2001 15:04
Subject: Loading data from flat file into Oracle--Please Help
> Hi,
> Is it possible to load from a flat file into an oracle table using perl.
The
> data fields is in fixed form length and the load is a conditional load.
>
> Here is the sample flat file
>
> MBOC YR_1991 REGROLL BSPSIEB 1.000000
> 1.000000
> ALLEP YR_1991 REGROLL COFYE 24.000000
> 24.000000
> ALLEP YR_1991 REGROLL1 COLOP 48.000000
> 48.000000
> MBOC YR_1991 REGROLL1 BSPSIEB 1.000000
> 1.000000
> ALLEP YR_1991 REGROLL2 COFYE 24.000000
> 24.000000
> ALLEP YR_1991 REGROLL2 COLOP 48.000000
> 48.000000
>
> The script should load only thows rows where the third column is "REGROLL"
> or "REGROLL2" and discard the rows with third column as "REGROLL1".
>
> How do I go about writing a perl DBI script to do this.
>
> I am xtremely new to perl and in the process of reading the PERL DBI Book.