File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes sending Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "sending "\n" delimited strings to Oracle" Watch "sending "\n" delimited strings to Oracle" New topic

sending "\n" delimited strings to Oracle

Irachi Chishima

Joined: Nov 26, 2001
Posts: 5
I am writing a JDBC utility and need to send multiple address lines down to a single column in Oracle using "new line" as the delimiter. When I look at the values in SQLPlus the lines are placed on separate lines but at the end of the line there is a black square. I am guessing that is the "\n" represented in SQLPlus. Anyone know a reliable way to send a new line delimited string to Oracle that will display better?
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

usually you don't incorporate formatting into the data that you are storing(line separators,etc.). You worry about that when you are programming. '\n' is the delimiter in a lot of languages but that may change if you have to change languages. Then '\n' would be unwanted characters in the database. What programmers traditionally do is to have several address line columns in the database(address1, address2,...) then format them accordingly in your program. Is this possible for you?
I agree. Here's the link:
subject: sending "\n" delimited strings to Oracle
It's not a secret anymore!