A cursor would slow down performance and in your case the count of updated records is only reduced to one because you're transporting the values via variables which reduces the read operation on the temporary
INSERTED
table to the first record. To resolve your problem simply join and assign the values needed in the
UPDATE
statement directly from
INSERTED
and it will work. Do something like this:
UPDATE a
SET a.[Field1] = b.[Field1]
, a.[Field2] = b.[Field2]
, ...
FROM [dbo].[TblDailyAttandence] a
INNER JOIN inserted b ON b.[Empcode] = a.[empcode] AND b.[Monthyear] = a.[MonthYear]