update dbo.diary set dbo.diary.STATUS = 1 where dbo.diary.[DATE] <= CONVERT(DATETIME, '2007-07-18 00:00:00', 102) and FNCode = '?' and status = 0 update dbo.DiaryDelegations set dbo.diarydelegations.status = 1 where dbo.diarydelegations.[DATE] <= CONVERT(DATETIME, '2007-07-18 00:00:00', 102) and handler = '?' or use keyhouse update dbo.diary set dbo.diary.STATUS = 1 WHERE ("Diary"."DATE">={ts '2011-09-01 00:00:00'} AND "Diary"."DATE"<{ts '2012-03-07 00:00:00'}) and FNCode = '?' and status = 0 update dbo.DiaryDelegations set dbo.diarydelegations.status = 1 WHERE ("DiaryDelegations"."DATE">={ts '2011-09-01 00:00:00'} AND "DiaryDelegations"."DATE"<{ts '2012-03-07 00:00:00'}) and handler = '?'