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

2014-07-29 Thread Thomas Mueller
Hi, I'm afraid you will need to manually edit the SQL script file. > 1.3.160 That's quite old, many bugs have been fixed since then. I suggest to upgrade to a more recent (1.3.x) version. Regards, Thomas On Saturday, July 26, 2014, Sanchand wrote: > Having the same problem any solution to

Re: [h2] org.h2.jdbc.jdbcSQLException - unique index or primary key violation: "sys_id on public.sys(id)" 23505-169

2014-07-29 Thread Thomas Mueller
Hi, I don't know what the problem is, but quite many bugs have been fixed since version 1.3.169 (see the change log). With version 1.3.171 and older: when using local temporary tables and not dropping them manually before closing the session, and then killing the process could result in a databas

Re: [h2] Error in 'merge into' for empty table with a column with a default value

2014-07-29 Thread Thomas Mueller
Hi, I'm afraid you need to use MERGE INTO VERSION_NUM (LOCK, VERSION, LOADED_FLAG) VALUES('X', 123,TRUE); > I am using version: 1.3.173 Actually, according to the error code (90081-166) you are using version 1.3.166. Regards, Thomas On Tuesday, July 29, 2014, Dani Fernandez wrote: > Hi all

Re: [h2] Updating all rows in a table.

2014-07-29 Thread Thomas Mueller
Hi, What about using a joined table "variable_node_2", where you store changes to the default values. At startup, truncate that table. I guess you will get additional ideas if you ask at StackOverflow.com Regards, Thomas On Tuesday, July 29, 2014, Dani Fernandez wrote: > We have a table conta

[h2] Updating all rows in a table.

2014-07-29 Thread Dani Fernandez
We have a table containing approx. 500k entries. Each time our server is restarted we need to reset all the records, to do so we use a query like: UPDATE VARIABLE_NODE SET NODE_VALUE = DEFAULT_VALUE, SUPPRESSION_STATE=FALSE, SUPPRESSION_RELEASE_TIME=0,

[h2] Error in 'merge into' for empty table with a column with a default value

2014-07-29 Thread Dani Fernandez
Hi all, I have this table definition: CREATE TABLE IF NOT EXISTS VERSION_NUM ( LOCK char(1) DEFAULT 'X' not null PRIMARY KEY, VERSION BIGINT, LOADED_FLAG boolean, constraint CK_T1_Locked CHECK (