db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas J. Taylor" <thomas.tay...@itqa.miami.edu>
Subject RE: Inserting a new line (\n) via sql script into Derby
Date Tue, 30 Aug 2005 14:18:55 GMT
What's wrong with just using the <ENTER> key?
- Thomas

ij> create table test (value varchar(60));
0 rows inserted/updated/deleted
ij> insert into test values ('First Line
Second Line');
1 row inserted/updated/deleted
ij> select * from test;
First Line
Second Line 

-----Original Message-----
From: Brian Bonner [mailto:brian.bonner@paraware.com] 
Sent: Monday, August 29, 2005 10:03 PM
To: Derby Discussion
Subject: Re: Inserting a new line (\n) via sql script into Derby

I think I found it: 

*ij.unicodeEscape= { onoff }*


Brian Bonner wrote:

> How do I insert a string with a linefeed into derby via an SQL script 
> with ij?
> The string literal that java would insert would look like this:  
> "line1\nline2".
> I need to insert it via an SQL script.  I've tried using unicode 
> \u000A and \n and neither will work.
> i.e.  insert into test (id, test) values (1, 'line1\u000Aline2');  (or
> line1\nline2 respectively)
> When I select the contents, I get the line1\u000Aline2  or
> line1\nline2 back out and not the line feed I was expecting (ok,
> hoping) to see:
> ie.
> line1
> line2
> Is this possible?

View raw message