ALTER TRIGGER [Ins51CheckInout]
ON [dbo].[CHECKINOUT]
AFTER Insert
AS
BEGIN
INSERT INTO AIS20080906181951..HR_ATS_OriginalityCard(fCardID,FCardDateTime,FEmpID)
SELECT 999,B.CheckTime,C.EM_ID FROM FMIATT..UserInfo A INNER JOIN FMIATT..Inserted B ON A.UserID=B.UserID
INNER JOIN AIS20080906181951..HM_Employees C ON A.SSN=C.Code
END
ALTER TRIGGER [Ins51CheckInout]
ON [dbo].[CHECKINOUT]
AFTER Insert
AS
BEGIN
INSERT INTO AIS20080906181951..HR_ATS_OriginalityCard(fCardID,FCardDateTime,FEmpID)
SELECT 999,B.CheckTime,C.EM_ID FROM FMIATT..UserInfo A INNER JOIN inserted B ON A.UserID=B.UserID
INNER JOIN AIS20080906181951..HM_Employees C ON A.SSN=C.Code
END
------解决方案--------------------
------解决方案-------------------- 如果没有数据在AIS20080906181951..HR_ATS_OriginalityCard,检查关联是否正确, 再在查询分析器中看看有没有符合条件的数据 SELECT 999,B.CheckTime,C.EM_ID FROM FMIATT..UserInfo A INNER JOIN CHECKINOUT B ON A.UserID=B.UserID INNER JOIN AIS20080906181951..HM_Employees C ON A.SSN=C.Code