Hi,

Sure, there is a roadmap which is basically a large todo list. I will
add this feature of course.

Thanks for your help!

Regards,
Thomas

On Thursday, August 5, 2010, Stefan <[email protected]> wrote:
> Hi,
>
> never mind would be just a great feature for me. Is this on some todo
> list on the near future? But no hurry I just want to know. Btw thanks
> for your always fast replies. :)
>
> The stack trace looks like this:
>
> WITH  TLink(sub, super) AS (
>         SELECT sub, super
>         FROM subClass
>         UNION ALL
>         (
>         SELECT sub.sub, super.super
>         FROM subClass AS sub
>         INNER JOIN TLink AS super
>                 ON sub.super = super.sub
>         EXCEPT
>         SELECT sub, super FROM TLink)
> )
> SELECT sub, super FROM TLink;
> General error: "java.lang.IndexOutOfBoundsException: Index: 0, Size:
> 0" [50000-140] HY000/50000 (Help)
> org.h2.jdbc.JdbcSQLException: General error:
> "java.lang.IndexOutOfBoundsException: Index: 0, Size: 0" [50000-140]
>     at org.h2.message.DbException.getJdbcSQLException(DbException.java:
> 327)
>     at org.h2.message.DbException.get(DbException.java:156)
>     at org.h2.message.DbException.convert(DbException.java:279)
>     at org.h2.server.TcpServerThread.sendError(TcpServerThread.java:
> 183)
>     at org.h2.server.TcpServerThread.run(TcpServerThread.java:136)
>     at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>     at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>     at java.util.ArrayList.get(ArrayList.java:322)
>     at org.h2.result.LocalResult.next(LocalResult.java:227)
>     at org.h2.index.ViewCursor.next(ViewCursor.java:40)
>     at org.h2.index.IndexCursor.next(IndexCursor.java:222)
>     at org.h2.table.TableFilter.next(TableFilter.java:340)
>     at org.h2.command.dml.Select.queryFlat(Select.java:492)
>     at org.h2.command.dml.Select.queryWithoutCache(Select.java:579)
>     at org.h2.command.dml.Query.query(Query.java:241)
>     at
> org.h2.command.dml.SelectUnion.queryWithoutCache(SelectUnion.java:152)
>     at org.h2.command.dml.SelectUnion.query(SelectUnion.java:354)
>     at org.h2.index.ViewIndex.find(ViewIndex.java:185)
>     at org.h2.index.IndexCursor.find(IndexCursor.java:136)
>     at org.h2.table.TableFilter.next(TableFilter.java:309)
>     at org.h2.command.dml.Select.queryFlat(Select.java:492)
>     at org.h2.command.dml.Select.queryWithoutCache(Select.java:579)
>     at org.h2.command.dml.Query.query(Query.java:241)
>     at org.h2.command.CommandContainer.query(CommandContainer.java:80)
>     at org.h2.command.Command.executeQuery(Command.java:132)
>     at org.h2.server.TcpServerThread.process(TcpServerThread.java:275)
>     at org.h2.server.TcpServerThread.run(TcpServerThread.java:134)
>     ... 1 more
>
>     at org.h2.engine.SessionRemote.done(SessionRemote.java:533)
>     at org.h2.command.CommandRemote.executeQuery(CommandRemote.java:
> 158)
>     at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:
> 172)
>     at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:151)
>     at org.h2.server.web.WebApp.getResult(WebApp.java:1310)
>     at org.h2.server.web.WebApp.query(WebApp.java:1003)
>     at org.h2.server.web.WebApp$1.next(WebApp.java:966)
>     at org.h2.server.web.WebApp$1.next(WebApp.java:969)
>     at org.h2.server.web.WebThread.process(WebThread.java:161)
>     at org.h2.server.web.WebThread.run(WebThread.java:88)
>     at java.lang.Thread.run(Thread.java:619)
>
>
> Kind regards
> Stefan
>
>
> On Aug 5, 9:19 am, Thomas Mueller <[email protected]>
> wrote:
>> Hi,
>>
>> INSERT INTO - SELECT doesn't work yet with CTEs, sorry. About the
>> IndexOutOfBoundsException I'm not sure yet, could you post the stack
>> trace?
>>
>> Regards,
>> Thomas
>>
>> On Wednesday, August 4, 2010, Stefan <[email protected]> wrote:
>> > Hello group,
>>
>> > I tried the new CTE feature and it works almost as expected. I have
>> > two questions:
>>
>> > Normal I have statements of the form:
>> > INSERT INTO table1 (coll1, col2, ..)
>> > SELECT col1, col2,... FROM table2
>>
>> > How can I insert the results of a CTE into a table?
>> > I tried the following forms.
>>
>> > INSERT...
>> > WITH..
>> > SELECT...
>>
>> > and
>>
>> > WITH...
>> > INSERT...
>> > SELECT...
>>
>> > None has worked.
>>
>> > My second question is what does the error message
>>
>> > General error: "java.lang.IndexOutOfBoundsException: Index: 0, Size:
>> > 0" [50000-140] HY000/50000 (Help)
>>
>> > mean?
>>
>> > I get it when quite big results are created. But the result is
>> > definitely finite.
>>
>> > I used the following CTEs and both gave me this error.
>>
>> > WITH  TLink(sub, super, N) AS (
>> >         SELECT sub, super, 1
>> >         FROM subClass
>> >         UNION ALL
>> >         SELECT sub.sub, super.super, N+1
>> >         FROM subClass AS sub
>> >         INNER JOIN TLink AS super
>> >                 ON sub.super = super.sub
>> >         WHERE N<2
>> > )
>> > --INSERT INTO subClass (sub, super)
>> > SELECT sub, super FROM TLink
>>
>> > WITH  TLink(sub, super) AS (
>> >         SELECT sub, super
>> >         FROM subClass
>> >         UNION ALL
>> >         (
>> >         SELECT sub.sub, super.super
>> >         FROM subClass AS sub
>> >         INNER JOIN TLink AS super
>> >                 ON sub.super = super.sub
>> >         EXCEPT
>> >         SELECT sub, super FROM TLink)
>> > )
>> > --INSERT INTO subClass (sub, super)
>> > SELECT sub, super FROM TLink
>>
>> > With these queries I wanted to save the transitive hull of a class
>> > relationship.
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "H2 Database" group.
>> > To post to this group, send email to [email protected].
>> > To unsubscribe from this group, send email to 
>> > [email protected].
>> > For more options, visit this group 
>> > athttp://groups.google.com/group/h2-database?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "H2 
> Database" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/h2-database?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to