-
Newline character in a column!
How do you check for a newline character in a column with some text in Oracle 8i? Thanks.
-
Code:
SELECT my_column, INSTR(my_column, CHR(10)) AS position_of_first_NL
FROM my_table;
Note that in above, CHR(10) is the standard ASCII code for line_feed (LF). Depending of the OS, the standard newline (NL) character sequence might be just LF, or it might be the sequence of CR+LF. In such case, repleced the above CHR(10) with CHR(13)||CHR(10)
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
Today's prize question - for 1¢ to be collected from me personally:
For what historical reason is it CR+LF and not LF+CR ?
-
The way typewriters used to operate in the pre-computer era?
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
Originally posted by jmodic
The way typewriters used to operate in the pre-computer era?
Close, but not good enough.
Come to think of it (several hours later) manual typewriters did (or still do) LF+CR.
Last edited by DaPi; 04-09-2005 at 03:46 AM.
-
Ok, DaPi, you've obviously saved yourself 1¢. But now, don't keep us waiting any more, tell us the correct answer. Tell us, tell us, tell us!
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
Back in the dark ages, the most common "interactive" device was the Teletype(TM) (which explains tty in Unix). They were slow; CR was very sloooooow - the print head perhaps had to move all the way from RH to LH margin. CR+LF was faster than LF+CR because the LF could take place during the CR. On some models, LF+CR+X could even cause the X to print in the middle of the page, CR+LF+X put the X at the LH margin.
-
Nice! I'll (try to) remember this one.
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|