Hi
In the below scenario i need to update the
I need to update the flag value to 'Y' for each ticket which has highest price
Create table #SLA ( Ticket varchar(20),sdate datetime,price decimal(8,2),Item varchar(20),flag varchar(10) null) INSERT INTO #SLA(Ticket,sdate,price,Item,flag) Select 'FV92337','2014-02-12',16.94 ,'611379',null union Select 'FV92337','2014-02-11',120.94 ,'551356',null union Select 'FV92337','2014-02-10',20.94 ,'551356',null UNION Select 'FV92222','2014-02-12',30.94 ,'287181',null union Select 'FV92222','2014-02-11',23.94 ,'611382',null union Select 'FV92222','2014-02-10',3.94 ,'11382',null SELECT * FROM #SLA