Used the migration tool to upgrade SQL Server 2012 SP4 to 2019 and received notification that sever triggers had syntax errors, error code 46010. Since I relatively new in this arena and didn't author the code, I need some help. The code looks like this:
GO
/****** Object: Trigger [dbo].[T_TblEtl_ITrig] Script Date: 16-Sep-2021 13:04:34 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[T_TblEtl_ITrig] ON [dbo].[TblEtl] FOR INSERT AS
SET NOCOUNT ON
/* * PREVENT INSERTS IF NO MATCHING KEY IN 'TBL_XXXX' */
IF (SELECT COUNT(*) FROM inserted) !=
(SELECT COUNT(*) FROM TBL_XXX, inserted WHERE (TBL_XXX.sm_group_id = inserted.EtGrpId))
BEGIN
RAISERROR ( 50006,16,1)
ROLLBACK TRANSACTION
END