R2-|
|R1---|
|--R2--|
Better is check when dates do not overlap and do negation – only 2
possibilities 😉
NOT (DATE_TO1mailto:firebird-supp...@yahoogroupscom]
Sent: Wednesday, 12 September, 2018 14:41
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Prev
On 12.09.2018 at 14:40, Omacht András aoma...@mve.hu [firebird-support]
wrote:
> [...]
>while (curr_date <= new.date_to) do
>
> begin
>
>insert into reserved_date (res_date) values (:curr_date);
>
>curr_date = dateadd(1 day to curr_date);
>
> end
>
> end
On a s
On 12.09.2018 at 15:04, Svein Erling Tysvær setys...@gmail.com
[firebird-support] wrote:
> Why wouldn't my suggestion work, Tomasz? When Karol inserts his first row
> into his main table it will contain DATE_FROM 2018-09-10 and DATE_TO
> 2018-09-20 and the trigger would insert 11 rows (one for eac
tember 12, 2018 1:59 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Prevent overlaping dates in concurent
environment
On 12.09.2018 at 13:29, Omacht András aoma...@mve.hu [firebird-support]
wrote:
> Create a (reserved_dates) table with date field, and make
Why wouldn't my suggestion work, Tomasz? When Karol inserts his first row
into his main table it will contain DATE_FROM 2018-09-10 and DATE_TO
2018-09-20 and the trigger would insert 11 rows (one for each date) into my
suggested table. When the next row is inserted with DATE_FROM 2018-09-15
and DAT
On 12.09.2018 at 14:40, Omacht András aoma...@mve.hu [firebird-support]
wrote:
> Tested on 2.5.8, dialect 1:
>
>
>
> CREATE TABLE RESERVED_DATE (
>
> RES_DATE DATE NOT NULL
>
> );
>
> ALTER TABLE RESERVED_DATE ADD CONSTRAINT RESERVED_DATE_PK PRIMARY KEY
> (RES_DATE);
>
>
>
> CREATE
KEY constraint "RESERVED_DATE_PK" on table
"RESERVED_DATE".
Problematic key value is ("RES_DATE" = '8-SEP-2018').
At trigger 'MEETINGS_BI' line: 9, col: 7.
András
From: firebird-support@yahoogroups.com
Sent: Wednesday, September 12, 2018 1:59 PM
To:
Hi,
but this require to have table with all dates. 365 rows per year per customer.
This is not possible solution. This sample with customers was only
simplification. But extend this sample to meeting time date with time. This
table will be too huge...
Regards,Karol Bieniaszewski
null
What about a separate table for dates with one row per date and a UNIQUE
constraint that you populate from a (AFTER INSERT/DELETE) trigger on your
real table?
HTH,
Set
Den ons. 12. sep. 2018 kl. 11:49 skrev liviuslivius
liviusliv...@poczta.onet.pl [firebird-support] <
firebird-support@yahoogroups
On 12.09.2018 at 13:29, Omacht András aoma...@mve.hu [firebird-support]
wrote:
> Create a (reserved_dates) table with date field, and make that field unique..
> When a user inserts a date into the reservation table a trigger immadiate
> inserts this date to the reserved_dates table too. Then the
Hi Karol!
Create a (reserved_dates) table with date field, and make that field unique..
When a user inserts a date into the reservation table a trigger immadiate
inserts this date to the reserved_dates table too. Then the unique key will
stop secound insert instead of the first transaction is n
11 matches
Mail list logo