Subject | MySQL Migration Trigger Issue |
---|---|
Author | Kurt Federspiel |
Post date | 2007-03-29T16:38:48Z |
Greets.
I have a table that is a data log of sensors and a
trigger does an update to keep track of the last value
only. That trigger is not working in FB.
The SQL for the trigger is below. The only difference
(so far) between MySQL and FB is the delimeter. For
example:
DELIMETER ^; --MySQL Version
set term ^; --FB Version
I verified that the MAC field IS currently populated,
the DateTime_Stamp is set to three days ago, and all
other fields are NULL, but there is still no update.
Any suggestions??
set term ^;
create trigger T_NEWDATA_UPDATE for DATA
active AFTER update as
BEGIN
UPDATE new_data set
A1=NEW.A1,
A2=NEW.A2,
Temp=NEW.Temp,
DateTime_Stamp=NEW.DateTime_Stamp
WHERE MAC=NEW.MAC
AND DustTime_Stamp<=NEW.DateTime_Stamp;
end^
commit^
set term ;^
____________________________________________________________________________________
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL
I have a table that is a data log of sensors and a
trigger does an update to keep track of the last value
only. That trigger is not working in FB.
The SQL for the trigger is below. The only difference
(so far) between MySQL and FB is the delimeter. For
example:
DELIMETER ^; --MySQL Version
set term ^; --FB Version
I verified that the MAC field IS currently populated,
the DateTime_Stamp is set to three days ago, and all
other fields are NULL, but there is still no update.
Any suggestions??
set term ^;
create trigger T_NEWDATA_UPDATE for DATA
active AFTER update as
BEGIN
UPDATE new_data set
A1=NEW.A1,
A2=NEW.A2,
Temp=NEW.Temp,
DateTime_Stamp=NEW.DateTime_Stamp
WHERE MAC=NEW.MAC
AND DustTime_Stamp<=NEW.DateTime_Stamp;
end^
commit^
set term ;^
____________________________________________________________________________________
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL