Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: adding database values to csv file

by dHarry (Abbot)
on Sep 26, 2011 at 07:40 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://927807]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2024-03-28 12:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found