Becky has asked for the wisdom of the Perl Monks concerning the following question:

Is there a way of using perl to write information from text files into the appropriate tables in an SQL database?

Replies are listed 'Best First'.
Re: writing to a database
by MZSanford (Curate) on Oct 25, 2002 at 15:22 UTC
      I had a look but thought that was just for querying databases rather than actually writing information to them?
        DBI will let you run any valid SQL statement (INSERT, UPDATE,SELECT, DROP, TRUNCATE, etc ...). It is the best loader aside fomr naitive loading protocols (like BCP for Sybase).
        from the frivolous to the serious

        Writing data to a database is querying the database in the sense that one uses SQL statements to get it done (i.e. CREATE TABLE and INSERT, etc).

        DBI is really the way to go for everything database. You will have to know SQL though, there's no way around that as far as I know.

        Regards, -gjb-