Here you go
create table BlahTable (OptyID varchar(10), ManagedBy char(1), [UniqueIdentifier] varchar(4))
insert into BlahTable
select '2-A23RT','A',NULL union all
select '2-A23RT','B',NULL union all
select '2-A23RT','C',NULL union all
select '1-QRT87','D',NULL union all
select 'A-89712','E', NULL union all
select 'A-89712','F',NULL
update b
set [UniqueIdentifier] = 'FLAG'
From BlahTable b join(
select OptyID,Min(ManagedBy) ManagedBy from BlahTable
group by OptyID) z on b.OptyID = z.OptyID and z.ManagedBy =b.ManagedBy
select * from BlahTable
âI sense many useless updates in you... Useless updates lead to fragmentation... Fragmentation leads to downtime...Downtime leads to suffering..Fragmentation is the path to the darkside.. DBCC INDEXDEFRAG and DBCC DBREINDEX are the force...May the force be with you" --
http://sqlservercode.blogspot.com/