[CLUE-Talk] Import large fixed length records into mysql (in a single pass)?

G. Richard Raab rraab at plusten.com
Fri Oct 8 10:29:19 MDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 08 October 2004 10:04 am, Jed S. Baer wrote:
> On Fri, 8 Oct 2004 00:31:01 -0700 (PDT)
>
> dave price <dp_kinaole at yahoo.com> wrote:
> > The data is one record per line, but rather than any
> > delimiter, we just know the character positions of
> > each field in the line. i.e.:
> >
> > position  length   field_name
> > ========  ======   ==========
> >    1         4     field_1
> >    5         10    field_2
> >    11        10    field_3
>
> Here are three approaches from the book "Data Munging With Perl".

You may wish to re-read Dave's post. 
He needs to do it with just MySql. 
IOW, just using tools from MySql (I know that Dave bought a license for MySql 
unless the work is under GPL).


IIRC, it is possible if doing it with just Postgres, 
but I do not think so with MySql.
Otherwise, perl is a great choice for this, as is gawk (smaller footprint iff 
this is a one time useage).

- -- 
cheers
g.r.r.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBZsBjhe/sjaHGmTIRArQLAJ9et/HaA9WoP1cn7QkJtAAzVpiAmgCgooNV
rvkRmf+pIIV+3PNa9D46SwI=
=pEYE
-----END PGP SIGNATURE-----



More information about the clue-talk mailing list