Can some help me convert the below select statement into an FOR INSERT TRIGGER:
SELECT s.ID, c.IsD
FROM dbo.AA_STABLE
s INNER JOIN dbo.VTABLE v ON s.PTC COLLATE SQL_Latin1_General_CP1_CI_AS = v.PTC
LEFT OUTER JOIN dbo.CCTABLE c ON s.ID COLLATE SQL_Latin1_General_CP1_CI_AS = c.ID
I need to use the INSERT INTO tblFINALTABLE using the FOR INSERTED records command because I want to process each record as they are inserted. I am able to do this myself when one table is involved but I am confused when I am joining multiple tables together. The dbo.AA_STABLE is the table the trigger will be placed on.
SELECT s.ID, c.IsD
FROM dbo.AA_STABLE
s INNER JOIN dbo.VTABLE v ON s.PTC COLLATE SQL_Latin1_General_CP1_CI_AS = v.PTC
LEFT OUTER JOIN dbo.CCTABLE c ON s.ID COLLATE SQL_Latin1_General_CP1_CI_AS = c.ID
I need to use the INSERT INTO tblFINALTABLE using the FOR INSERTED records command because I want to process each record as they are inserted. I am able to do this myself when one table is involved but I am confused when I am joining multiple tables together. The dbo.AA_STABLE is the table the trigger will be placed on.