this is hwatt i came up with anyone see any flaws? it seems to work as i want it to
set ANSI_NULLS ON
set QUOTED_IDENTIFI ER ON
go
ALTER TRIGGER [monitorJournal]
ON [dbo].[Journal]
AFTER INSERT, UPDATE
AS
SET NOCOUNT ON;
IF (select AssetTag from inserted) <> '' AND (select transferTo from Inserted) <> '' AND (select transferToCustT ype...
User Profile
Collapse
-
SQL 2005 trigger Help
Hello
I have 2 tables, Journal and Config
Journal holds fields AssetTag, TransferFrom, TransferTo
Config holds AssetTag, CustID
I cannot figure out how to create a trigger that when a record is inserted into Journal, the trigger finds the record in Config with the matching AssetTag and updates Config.CustID with the data from Journal.Transfe rTo
(AssetTag is unique in Config table)
No activity results to display
Show More
Leave a comment: