[h2] Syntax error in SQL statement "WITH" keyword

2014-03-27 Thread Anteneh Mamo
Hi,

jdbc:h2:mem:request_no;MODE=Oracle

We are using the h2 version 1.3.171 with windows 7 (64 bit) and jdk 
1.7.0_25.

when we try to run the sql statement : *WITH TMP1 AS (SELECT col1 FROM 
table1) SELECT TMP1.col1 FROM TMP1* . we are getting the below exception
org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "WITH TMP1 
AS[*] (SELECT REQUEST_NO FROM QUOTE) SELECT TMP1.REQUEST_NO FROM TMP1"; 
expected "., ("; SQL statement:
WITH TMP1 AS (SELECT REQUEST_NO FROM QUOTE) SELECT TMP1.REQUEST_NO FROM 
TMP1 [42001-171]

sql statement is fine as we are able to execute it successfully via sql 
developer.

any help is appreciated.

Thanks.




-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Unique index or primary key violation: "SYS_ID ON PUBLIC.SYS(ID)" [23505-168] (using 1.3.168)

2014-03-27 Thread Dieter Cailliau
Thoms the database is attached to the first post of this topic.

Op donderdag 20 maart 2014 07:53:26 UTC+1 schreef Thomas Mueller:
>
> Hi,
>
> > I'm not using temporary tables 
>
> I think there are some cases where Hibernate creates temporary tables, and 
> for some queries (those that return many rows) the database itself creates 
> temporary tables.
>
> If you still have the database file, could you send it to me please? I 
> would like to analyze it.
>
> Regards,
> Thomas
>
>
>
> On Tuesday, March 18, 2014, Dieter Cailliau 
> > 
> wrote:
>
>> URL: jdbc:h2:/tmp/bms;DB_CLOSE_DELAY=-1;LOCK_TIMEOUT=5000
>>
>> According to your query, the create_build was 168. 
>> I'm not using temporary tables (afaik) just regular JPA (hibernate inside 
>> jboss7).
>> I didn't see OutOfMemory in my logs, but they don't go back to the first 
>> occurence of the problem, so i'm not sure.
>>
>> I am using XA. The error shows up when the first connection is obtained: 
>> org.h2.jdbcx.JdbcDataSource.getXAConnection(JdbcDataSource.java:331). 
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "H2 Database" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to h2-database+unsubscr...@googlegroups.com.
>> To post to this group, send email to h2-database@googlegroups.com.
>> Visit this group at http://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Re: Inserting into View not supported

2014-03-27 Thread Rami Ojares

I feel your pain.
I would like to be rich.
You know like filthy rich.
But the banks simply refuse to give me the money!

- Rami

Ps. View updateability is a complex issue and currently not implemented
in a generic and complete fashion in ANY database in existence (afaik).
The nice thing with h2 is that it still allows you to do it case by 
case if you really need it.

I do agree that view updateability is a powerful feature.


I'm bringing this old thread back to life, but it's still better than
starting a new one with the same issue. I'm running into the same
situation, but I really don't want to create a trigger in this way
(with a Java Class). Is there a way to do the same thing without
having to create Java code? I would like to be able to leave this to
the Database 100%.

--
You received this message because you are subscribed to the Google
Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to h2-database+unsubscr...@googlegroups.com
.
To post to this group, send email to h2-database@googlegroups.com
.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.



--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Re: Inserting into View not supported

2014-03-27 Thread Martin Schmiedel
Hi Thomas,

I'm bringing this old thread back to life, but it's still better than 
starting a new one with the same issue. I'm running into the same 
situation, but I really don't want to create a trigger in this way (with a 
Java Class). Is there a way to do the same thing without having to create 
Java code? I would like to be able to leave this to the Database 100%. 

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] How does H2 DB support TIMESTAMP WITH TIMEZONE DATATYPE

2014-03-27 Thread Noel Grandin

Well, this is an open-source project, so patches are always welcome :-)

But that being said, I might have some time to work on this in the next few weeks, provided that you can provide me with 
some input:


Do you know
(a) what the most common string representation of such a datatype is
(b) how it is returned in a ResultSet, since there is no JDBC datatype for it
(c) how it is passed into a PreparedStatement

On 2014-03-26 08:35, Jake Page wrote:

Might be kind of an old thread, but to say "this datatype is not widely 
supported" is not true - it's ANSI SQL-92, and
supported by Oracle, Postgres, and MSSQL (as you said), which makes it pretty 
widely supported by definition!

Since H2 in theory supports a lot of compatibility modes, this would probably 
be one of the biggest of those that's not
currently supported...



--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.