Copy Code Trigger Definition

                
CREATE trigger dbo.[TR_GROUPDATA_INSERT_HOUSEHOLD_UPDATE] on dbo.[GROUPDATA] after insert not for replication
as
begin
  set nocount on;

  --Insert new households into the constituent current household table...

  insert into dbo.[CONSTITUENTHOUSEHOLD] ([ID], [ISHOUSEHOLD])
    select
      [ID],
      1
    from inserted
    where [GROUPTYPECODE] = 0;
end