Hi,
I get a different result with the H2 version 1.4.196 as with 1.4.197 when I
run the following query.
In my opinion, the result of 1.4.196 is correct.
Any ideas?
Thanks in advance
Francisco
Create table:
CREATE TABLE TEST (
"ENTITY_ID" NUMBER(18,0) NOT NULL,
"VALID_FROM" DATE(7) NOT NULL,
"VALID_TO" DATE(7) NOT NULL
);
Inserts:
INSERT INTO TEST (ENTITY_ID, VALID_FROM, VALID_TO)
VALUES (11, '2018-08-24', '2018-08-24');
INSERT INTO TEST (ENTITY_ID, VALID_FROM, VALID_TO)
VALUES (11, '2018-08-25', '9999-12-31');
Query:
SELECT t.entity_id, t.valid_from, t.valid_to
FROM TEST t
WHERE t.valid_to NOT IN
(SELECT (t1.valid_from - 1)
FROM TEST t1
WHERE t1.entity_id = t.entity_id);
Result 1.4.196:
ENTITY_ID VALID_FROM VALID_TO
11 2018-08-25 9999-12-31
Result 1.4.197:
ENTITY_ID VALID_FROM VALID_TO
11 2018-08-24 2018-08-24
11 2018-08-25 9999-12-31
--
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 https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.