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

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'



Comment on Re: adding database values to csv file
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://927807]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2016-02-11 01:09 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (358 votes), past polls