IF  EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[ReservationRoomlineInitialNumberofRooms]'))
DROP TRIGGER [dbo].[ReservationRoomlineInitialNumberofRooms]
GO
CREATE TRIGGER [dbo].[ReservationRoomlineInitialNumberofRooms] 
   ON  [dbo].[ReservationRoomline] 
   FOR INSERT NOT FOR REPLICATION
AS 
BEGIN
  SET NOCOUNT ON
  UPDATE ReservationRoomline
  SET InitialNumberOfRooms = New.NumberOfRooms
  FROM inserted NEW
  INNER JOIN ReservationRoomline Rl ON Rl.LINENUMBER = New.LINENUMBER
END
