Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC and the fly likes sending Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "sending "\n" delimited strings to Oracle" Watch "sending "\n" delimited strings to Oracle" New topic
Author

sending "\n" delimited strings to Oracle

Irachi Chishima
Greenhorn

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?
Thanks!
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?
Jamie
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: sending "\n" delimited strings to Oracle