Jump to content

Archived

This topic is now archived and is closed to further replies.

edlentz

Table Export format

Recommended Posts

I need to export a table and I cna't seem to get it right. The format I need is: CSV with all fields enclosed with "" and null or empty fields with a 0 or o in them. Can this be done through a query?

Thanks

Share this post


Link to post
Share on other sites
You can try the following:

[code]SELECT ... INTO OUTFILE '<yourfile>' FIELDS TERMINATED BY "," LINES TERMINATED BY "\n";'[/code]

Any conversion of null/blank to zeros will have to be done as part of the select column expression clause explicity.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.