CREATE PROCEDURE dbo.GetSpotsByCompanyIDWithRange ( @CompanyID UniqueIdentifier, @StartRange DateTime, @EndRange DateTime, @Sentinel Bit, @SentinelMark VarChar ) AS BEGIN SET NOCOUNT ON; -- Set the Sentinel Mark, Status, And Status Time UPDATE TrackSpot SET SentinelMark = @SentinelMark, Record_Status_dt = @SetTime, Record_Status = "Sentinel Marked" WHERE s.CompanyID = @CompanyID AND Spot_Time >= @StartRange AND Spot_Time <= @EndRange AND Sentinel = @Sentinel SELECT * from inserted -- return the inserted rows -- I didn't list fields for simplicity ENDCetin