do you mean this?DECLARE @day intSET @day = -1UPDATE tSET t.columnname1 = value1,t.columnname2= value2,...from tablename twhere t.ModifiedDate >= DATEADD(dd,DATEDIFF(dd,0,GETDATE())+@Day,0)and t.ModifiedDate < DATEADD(dd,DATEDIFF(dd,0,GETDATE())+@Day+1,0)
this will work for any value of @day which will regarded as offset from current day------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/