Unanswered: Unexpected results with sqlplus-script
I'm using a sqlscript to export data from an Oracle-table using sqlplus. The script does some set-options suchs as linesize, heading, newpage, pagesize and such. The select-statement is spooled into a text-file, the selected fields are piped so the text-file is delimited by characters that I know are very unlikely to appear in the varchar2 columns.
There's a weird thing in the resultset I get though. The varchar2 columns may have CR / LF which not only appears between the delimiter but also at the end of the row.
Here's an example (; is the delimiter):
There's an extra CR/LF at the end of row3.
When I replace the CR/LF I have no extra CR/LF at the end of row3.
I tried using a rowterminator as wel, and the extra CR/LF came
after the rowterminator.
My question is: why is an extra CR/LF added at the end of the row when CR/LF are _not_ replaced by text?