RE: Load data line break problem
"adrian GREEMAN" <[email protected]> Mon, 30 Oct 2006 16:37:27 -0000
| Newsgroups | gmane.comp.db.mysql.windows |
|---|---|
| Organization | Pix and Words |
| Message-ID | <002b01c6fc41$afe0d8e0$382f4654@ADRIAN1> |
Thanks I thought it might be so but am puzzled how I do it If I look at the date for entry in the text editor I have the line breaks show up simply as - well - line breaks i.e. as simply a new paragraph. I.e. I can't actually SEE the \r\n in the text, just where it goes onto a new line. So how do I escape them? Can you make them visible? And I am fairly sure that in the past when I used MySQL 4 and so forth, that as long as I was entering text strings WITHIN quotes then I did not need escapes if there was a new paragraph. Regards Adrian g -----Original Message----- From: John Theroux [mailto:[email protected]] Sent: 30 October 2006 16:00 To: adrian GREEMAN Subject: RE: Load data line break problem MySQL requires several characters to be escaped as so: a\\r\\n for a\r\n hope this helps john <snip> Whenever these strings contain a line break, i.e. a \r\n paragraph sign, MYSQL is treating that as the end of a line in the data. It goes onto a new entry and of course the fields are all out of order and various nulls and such like get entered until that data item is exhausted. It then starts entering the data properly again from the next entry until it again encounters a line break within one of the text strings. But these breaks are within the string and within the quotes surrounding the string. I had assumed they would just be treated as part of the string and only line breaks outside quotes would be used to move onto new entries? But perhaps they have to be escaped in some way?? </snip> -- MySQL Windows Mailing List For list archives: http://lists.mysql.com/win32 To unsubscribe: http://lists.mysql.com/[email protected]