getting data out: mysql -> csv

William Park opengeometry-FFYn/CNdgSA at public.gmane.org
Tue May 29 22:21:09 UTC 2007


On Tue, May 29, 2007 at 04:28:41PM -0400, Emma Jane Hogbin wrote:
> Good afternoon,
> 
> I'm in the process of trying to yank content out of one CMS and into 
> another CMS. The import function on the new CMS requires that the data 
> be in a CSV. This should be 'easy'... except the data contains new lines 
> and tabs (apparently) because each time I try to export the data, it 
> doesn't play nicely as a CSV.
> 
> I've tried googling "mysql export csv" and found the following:
> http://forums.mysql.com/read.php?79,11324,13062#msg-13062
> I don't have the select into outfile flag
> and
> http://tlug.dnho.net/?q=node/209
> The explanation of the sed cleanup is wrong, I know.
> 
> In the first option there is a follow-up question which is exactly the 
> same as mine... "what if there are characters in the data which are the 
> same characters that are to be used as delimiters?" I've asked the techs 
> to enable the "select into outfile" option for me.. but in the mean 
> time, my question remains: how do you get HTML fragments (especially 
> when there are new lines, tabs and quotes as part of the data) out of a 
> MySQL table and into a CSV?

Whole purpose of CSV is to handle data with delimiter characters.  So...
is this the problem of exporting malformed CSV, or the problem of
buggy importing routine?

-- 
William Park <opengeometry-FFYn/CNdgSA at public.gmane.org>, Toronto, Canada
ThinFlash: Linux thin-client on USB key (flash) drive
	   http://home.eol.ca/~parkw/thinflash.html
BashDiff: Super Bash shell
	  http://freshmeat.net/projects/bashdiff/
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list