Skip navigation links

MySQL Forums :: General :: export a table to a tab delimited file


Advanced Search

export a table to a tab delimited file
Posted by: theo.galanakis ()
Date: October 08, 2004 01:04AM

Trying to export a tab delimited file with the following command, however it does not appear to strip out the CR/LF within a varchar column.

select * into outfile '/tmp/users.txt' FIELDS ESCAPED BY '\\' LINES TERMINATED BY '\r\n' from users;

However when I use the below function to export as an insert statement, it escapes all the CR/LF within each column.

mysqldump --database mydatabase --password --user myusername --verbose --complete-insert --tables users > myfile.sql

Does anyone have any insigt into why the above select does not escape CR/LF within varchar columns?

I really want to get the export as tab delimited working to import into postgres,which is much faster than insert statements.

Theo

Options: ReplyQuote


Subject Written By Posted
export a table to a tab delimited file theo.galanakis 10/08/2004 01:04AM


Sorry, you can't reply to this topic. It has been closed.

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.