Subject | Re: [ib-support] Question about koncept |
---|---|
Author | Ali Gokcen |
Post date | 2001-02-07T14:39:21Z |
Sorry, i didn't check my code very well.
the insert of arc_master must be at firts line... ( because of archive
master/detail integrity )
Ali
the insert of arc_master must be at firts line... ( because of archive
master/detail integrity )
Ali
----- Original Message -----
From: Ali Gokcen
To: ib-support@yahoogroups.com
Sent: Wednesday, February 07, 2001 4:28 PM
Subject: Re: [ib-support] Question about koncept
Hi Jörg,
here is your before insert trigger ...
CREATE TRIGGER MASTER_T1 FOR MASTER ACTIVE BEFORE DELETE POSITION 0
DECLARE ID INTEGER;
BEGIN
ID = master.cust_id;
insert into arc_detail select * from detail where cust_id = :ID; // it
will fast enough because server side.
delete from detail where cust_id = :ID;
insert into arc_master select * from master where cust_id = :ID;
END
be careful, you should define another referential integrity for archive
tables because there will be duplicate cust_ids.
Regards,
Ali
----- Original Message -----
From: Jörg Schiemann
To: ib-support@yahoogroups.com
Sent: Wednesday, February 07, 2001 4:14 PM
Subject: Re: [ib-support] Question about koncept
Hi,
that means a lot of moving.
Is there an easy SQL command for moving a master + details?
--
Regards,
Jörg Schiemann