Hi,
> Why is this not accepted?
I don't know. Sometimes messages are marked as spam by the Google Group
system. Usually I get a notification if that happens and can approve the
email. But in this case, I didn't get a notification. Not sure why, maybe
it's related to using Nabble.com?
------------------------
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 (LOCK='X'))
I am trying to insert a record like:
MERGE INTO VERSION_NUM (VERSION, LOADED_FLAG) VALUES(123,TRUE);
But this is not possible as I am getting this exception:
Column "LOCK" contains null values; SQL statement:
MERGE INTO VERSION_NUM (VERSION, LOADED_FLAG) VALUES(123,TRUE) [90081-166]
90081/90081 (Help)
The idea is to have a table with only one row, so the 'MERGE' changes or
inserts (if it is the first record) only the single record.
Am I doing something wrong? In my opinion the merge should work even there
is no value in the table because of the 'default 'x' definition for the
column lock.
Any ideas?
I am using version: 1.3.173
On Fri, Jul 25, 2014 at 5:39 PM, danielfb <[email protected]> wrote:
> Why is this not accepted?
>
>
>
> --
> View this message in context:
> http://h2-database.66688.n3.nabble.com/Error-using-merge-on-a-table-that-has-a-column-with-a-default-value-tp4029698p4029702.html
> Sent from the H2 Database mailing list archive at Nabble.com.
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.