- 论坛徽章:
- 0
|
我的SYBASE ASE版本是Adaptive Server Enterprise/12.5.3/EBF 13061 ESD#5/P/NT (IX86)/OS 4.0/ase1253/1939/32-bit/OPT/Tue Dec 06 00:21:31 2005
我在其中一个数据库中建了如下的一个触发器:
create trigger Trigger_NSHCCQKB on NSHCCQKB
for UPDATE ,INSERT
as
begin
update NSHCCQKB
set X.modify_date = getdate()
from NSHCCQKB X,inserted i
where X.NSHDM = i.NSHDM and X.BGZS = i.BGZS and X.DJRQ = i.DJRQ and X.ZCPH = i.ZCPH and X.JSSL = i.JSSL and X.DJLX=i.DJLX and X.LX_CCZL = i.LX_CCZL
end
该触发器应实现的功能是自动更新该表的modify_date列值,使其具备时间戳的功能,但它却无法实现其应修改modify_date这一列功能,而在另一个表(同库)上建的类似一个触发器却有效:
create trigger Trigger_DFHFZJG on DFHSFZJG
for UPDATE ,INSERT
as
begin
update DFHSFZJG
set modify_date = getdate()
from DFHSFZJG X,inserted i
where X.NSHDM = i.NSHDM and X.BGZS = i.BGZS and X.TYDM = i.TYDM and X.DJLX=i.DJLX
end
极度无奈中,特向各大侠求助,急!急!急! |
|