At 08:51 PM 2/27/00 , Kevin Diffily wrote:
>Does anyone know of a shell/perl script that will convert a DBI formatted
>db into text delimited format or better yet that will insert them into a
>Postgresql or mysql database directly?
I don't know what "DBI formatted db" is but this script takes a
MIME-encoded CSV message on STDIN and stuffs it into an SQL database... it
would be easy to remove the MIME stuff. And using unpack() you could
convert it to using column-delimited input. It's set up for mysql but it
should be simple to switch to postgresql but I couldn't get the DBD module
to compile on my RH 6.? box (it couldn't find some postgresql header files
and I wasn't going to install the tarball).
http://www.ipat.com/NetAssess/insert.pl.text
If you're inserting a lot of stuff, I think there are more efficient ways
to insert the block but I'm an SQL newbie.
If you use it, let me know how it goes.
-Alan
---
Alan D. Mead / Research Scientist / [EMAIL PROTECTED]
Institute for Personality and Ability Testing
1801 Woodfield Dr / Savoy IL 61874 USA
217-352-4739 (v) / 217-352-9674 (f)
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.