Bug #25243 Add CSV output option to the MySQL command line client

Submitted: 22 Dec 2006 11:02 Modified: 22 Dec 2006 11:31
Reporter: Lenz Grimmer Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S4 (Feature request)
Version: OS:
Assigned to: CPU Architecture:Any

[22 Dec 2006 11:02] Lenz Grimmer
Description:
Currently, the "mysql" command line client provides an option to output the result of a query as tab-delimited values in batch mode. However, many applications can't easily import this format and only support comma-separated values (CSV). It would be nice if the MySQL client would be capable of returning CSV values in addition to the tab-delimited format.

How to repeat:
Try to create CSV-formatted output by using the mysql client. Observe it's not supported.

Suggested fix:
Provide the required formatting functionality to return CSV values in addition to the tab-delimited format.
[22 Dec 2006 11:31] MySQL Verification Team
Thank you for the bug report feature request.
[2 Jan 2007 12:54] Lenz Grimmer
As a workaround, it's of course possible to use Perl to convert the output on the fly - see this snippet on MySQL Forge as an example: http://forge.mysql.com/snippets/view.php?id=55

But still, I'd prefer if this functionality would be built into the mysql client directly.
[5 Mar 2009 20:11] Ben Small
This would be a great feature to have. As of now, you have to work some grep, sed, awk, perl magic...
[22 Mar 2010 16:48] Lachlan Mulcahy
Ran across another case today where this would have saved some time. +1 on the feature request.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.053 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.