I wanted to know if this is possible to do in SQL Server, to do it in another way than cursors because its extremly slow. Have a Cursor that checks the row prior to itself and IF @Machine <> @MachineCur OR @MachineStatus <> @MachinestatusCur OR @sShift <> @sShiftCur then do a insert into a table.I wanted to know if this is possible to do in S