Reputation: 2184
I'm building a java string and adding newline characters ("\n") where I want to indicate the end of a record. I was storing this string in oracle in a VARCHAR2 field and everything was working just fine until the data I was storing grew too large for such a field. I now am trying to save the records in a CLOB, but when I retrieve the records the newline is missing.
How can I make sure that when I retrieve the data the newlines are still there?
I'd love to add code examples, but I'm working with an API that abstracts the database layer so I'm not exactly certain what it's doing. All I know is it worked when it was saving as a VARCHAR2 but as a CLOB it's gone.
Upvotes: 3
Views: 5937
Reputation: 4818
Here is a link to a thread addressing the same issue:
Are escape sequences preserved in CLOB??
There is no reason the CLOBs should be losing your escape characters as long as you are using the correct encodings the entire time AFAIK.
Upvotes: 1