Re: ?? How to get newlines in text ??

From: Scott Urman <surman_at_oracle.com>
Date: 19 Feb 1995 21:21:07 GMT
Message-ID: <3i8co3$1ol_at_dcsun4.us.oracle.com>


In article <3i3hla$lms_at_indy-backup.indy.net>, bstanek_at_indy.net (Brian Stanek) writes:
|> Parris Geiser (parris_at_walleye.esp.bellcore.com) wrote:
|> : I have a varchar column in a table that my users would like to place
|> : "formatted" text, i.e., text that contains newlines.
|> : So, for example, what I would like to do is:
|> : insert into MyTable values ('First line \n Second line');
|> : Then, when I do the select:
|> : select col from MyTable;
|> : I get the output that looks like:
|> : First line
|> : Second line
 

|> : Does anyone have an idea on how to accomplish this?
|>
|>
|> Try using:
|>
|> insert into test_table values ('First Line' || chr(10) ||
|> 'Second line');
|>
|> We use the a lot
|>
|>
|> Brian Stanek
|> Profound Consulting

The reason why this works is because your database is on a machine which uses the ANSI character set. Note that if you move to a machine with a different character set (such as a PC, which uses EBCIDIC) then chr(10) won't be a carriage return. Received on Sun Feb 19 1995 - 22:21:07 CET

Original text of this message