Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: adding database values to csv file

by dHarry (Abbot)
on Sep 26, 2011 at 07:40 UTC ( #927807=note: print w/replies, xml ) Need Help??


in reply to adding database values to csv file

Most databases offer functionality to allow you to dump the contents in various formats. Maybe you can make use of those tools? They typically give good performance.

Depending on the database brand it might be possible to use a SQL statement to produce a csv formatted output file, e.g. something like (mySQL):

SELECT col1, col2, col3, ... FROM some_table INTO OUTFILE '/tmp/some_table.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'

Cheers

Harold

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://927807]
help
Chatterbox?
[Lady_Aleena]: That's not fair
[Lady_Aleena]: I was thinking about moving WorldBuilding to Random, since it is all randomness in that group anyway, but Random::World is the same length as WorldBuilding. I wouldn't be doing myself any favors.

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2017-05-25 03:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?