New line disappears in notepad and displays in notepad++

Here’s my code:

SELECT TRIM(CONCAT_WS(' ',hn,hn_suf,dir,sn,type,suf)) AS addr  
    FROM vot13
    WHERE zip = '68502'
    GROUP BY addr
    INTO OUTFILE 'c:/users/desktop/geo2.csv'
    ENCLOSED BY '\"'

Output displays in notepad as:
“100 A St”“1001 C St”“1001 Peach St”

Output displays in notepad++ as:
“100 A St”
“1001 C St”
“1001 Peach St”

Any idea why?

This has nothing to do with your DB file and everything to do with the fact that notepad only recognizes \r\n as new line markers. I would suggest using a real editor (like ++) to ensure your code or db export files aren’t mangled by an application that was never intended as an editor.

Also you can use SublimeText

Well, at least you’re not using Word. Things like curly quotes look great in print but the wreak havoc in code.

I used plain Notepad for many years. It worked and in some ways the simplicity helped me to learn proper syntax because of the many times I needed to troubleshoot mistakes.

- BUT - if you already have Notepad++ I strongly recommend that you use it for working with code files.
Or try other text editors or even IDEs if you you don’t like it.

Notepad is great for simple notes like “my-todo-list.txt” but when it comes to code editors there are much better alternatives available.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.