begin transaction declare @err1 int, @err2 int /* Add a record to students */ insert into students (studentID, lastname, firstname, middleini, ...) values (@studentid, @lastname, @firstname, ...) set err1 = @@error /* Log the move */ if @logmove = 1 insert into movelog (studentID, hallfrom, ...) values (@studentID, 'NEW', ...) set @err2 = @@error if @err1 = 0 and @err2 = 0 begin commit transaction set @return = 'Move successfull' end else begin rollback transaction set @return = 'Unable to move student out. The transaction did not complete.' endIm just wondering if there is an eaiser way to accomplish this?