db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: COPY command
Date Tue, 03 Mar 2009 14:14:53 GMT
Hi Walter,

Derby's SQL dialect is documented in the Reference Guide: 
http://db.apache.org/derby/docs/10.4/ref/

If what you need to do is populate a table from stdin, you can do this 
by writing a table function which reads from stdin and presents the 
input as rows. Then you populate your table like this:

insert into mytable
select * from table( stdinReadingTableFunction() ) s

Table functions are described in the Developer's Guide in a section 
titled "Programming Derby-style table functions": 
http://db.apache.org/derby/docs/10.4/devguide/ Table functions are 
discussed at length in the white paper posted here: 
http://developers.sun.com/javadb/reference/whitepapers/index.jsp

Hope this helps,
-Rick


Walter Rogura wrote:
> Hi,
>
> is there a COPY command applicable in derby? I know this from
> PostgreSQL, e.g.
> COPY table (column1, column2) FROM stdin;
> c11	c12
> c21	c22
> c31	c32
> \.
>
> I tried it with SQuirreL but had no success. Btw. where do I find a
> reference of supported SQL commands in derby?
>
> Thank you very much,
> Walter
>   


Mime
View raw message