Subject | Re: [firebird-support] An Interesting Update Trigger Behavior |
---|---|
Author | Kurt Federspiel |
Post date | 2009-08-12T03:25:41Z |
Hi, Mark.
Apologies for the delay, but I got trapped by RL.
I think you are right that the trigger is the issue because it tests two TIMESTAMP fields to see which is greater.
BEGIN
UPDATE new_data set A1=NEW.A1, A2=NEW.A2, DateTime_Stamp=NEW.DateTime_Stamp
WHERE MAC=NEW.MAC AND DateTime_Stamp<=NEW.DateTime_Stamp;
end
Since NULL is a lack of data, I assume that would fail. I haven't put in a test for NULL yet. Would a simple OR suffice?? For ExampleFrom sd@... Wed Aug 12 01:05:36 2009
Return-Path: <sd@...>
X-Sender: sd@...
X-Apparently-To: firebird-support@yahoogroups.com
X-Received: (qmail 56365 invoked from network); 12 Aug 2009 08:05:27 -0000
X-Received: from unknown (69.147.108.200)
by m8.grp.re1.yahoo.com with QMQP; 12 Aug 2009 08:05:27 -0000
X-Received: from unknown (HELO mail.ibphoenix.com) (12.197.12.139)
by mta1.grp.re1.yahoo.com with SMTP; 12 Aug 2009 08:05:27 -0000
X-Received: from localhost (localhost [127.0.0.1])
by mail.ibphoenix.com (Postfix) with ESMTP id 586F61C705D
for <firebird-support@yahoogroups.com>; Wed, 12 Aug 2009 04:04:35 -0400 (EDT)
X-Received: from mail.ibphoenix.com ([127.0.0.1])
by localhost (mail.ibphoenix.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 30295-03 for <firebird-support@yahoogroups.com>;
Wed, 12 Aug 2009 04:04:33 -0400 (EDT)
X-Received: from [10.169.232.153] (89-24-6-103.i4g.tmcz.cz [89.24.6.103])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client did not present a certificate)
by mail.ibphoenix.com (Postfix) with ESMTP id 449D61C7020
for <firebird-support@yahoogroups.com>; Wed, 12 Aug 2009 04:04:29 -0400 (EDT)
Message-ID: <4A827773.2090203@...>
Date: Wed, 12 Aug 2009 10:04:03 +0200
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
To: firebird-support@yahoogroups.c
Apologies for the delay, but I got trapped by RL.
I think you are right that the trigger is the issue because it tests two TIMESTAMP fields to see which is greater.
BEGIN
UPDATE new_data set A1=NEW.A1, A2=NEW.A2, DateTime_Stamp=NEW.DateTime_Stamp
WHERE MAC=NEW.MAC AND DateTime_Stamp<=NEW.DateTime_Stamp;
end
Since NULL is a lack of data, I assume that would fail. I haven't put in a test for NULL yet. Would a simple OR suffice?? For ExampleFrom sd@... Wed Aug 12 01:05:36 2009
Return-Path: <sd@...>
X-Sender: sd@...
X-Apparently-To: firebird-support@yahoogroups.com
X-Received: (qmail 56365 invoked from network); 12 Aug 2009 08:05:27 -0000
X-Received: from unknown (69.147.108.200)
by m8.grp.re1.yahoo.com with QMQP; 12 Aug 2009 08:05:27 -0000
X-Received: from unknown (HELO mail.ibphoenix.com) (12.197.12.139)
by mta1.grp.re1.yahoo.com with SMTP; 12 Aug 2009 08:05:27 -0000
X-Received: from localhost (localhost [127.0.0.1])
by mail.ibphoenix.com (Postfix) with ESMTP id 586F61C705D
for <firebird-support@yahoogroups.com>; Wed, 12 Aug 2009 04:04:35 -0400 (EDT)
X-Received: from mail.ibphoenix.com ([127.0.0.1])
by localhost (mail.ibphoenix.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 30295-03 for <firebird-support@yahoogroups.com>;
Wed, 12 Aug 2009 04:04:33 -0400 (EDT)
X-Received: from [10.169.232.153] (89-24-6-103.i4g.tmcz.cz [89.24.6.103])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client did not present a certificate)
by mail.ibphoenix.com (Postfix) with ESMTP id 449D61C7020
for <firebird-support@yahoogroups.com>; Wed, 12 Aug 2009 04:04:29 -0400 (EDT)
Message-ID: <4A827773.2090203@...>
Date: Wed, 12 Aug 2009 10:04:03 +0200
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
To: firebird-support@yahoogroups.c