i have a table
sou_id sou-name rool_upid roll_upname
1 AA null null
2 BB null null
3 CC null null
1 DD null null
2 EE null null
5 CC null null
i need to first use an update statement to get --if there is same id with multiple name i need to get maximum of it in roll_upid and roll_upname
i.e. AFTER UPDATE THE ABOVE TABLE SHOULD HAVE VALUES LIKE THIS
sou_id sou-name rool_upid roll_upname
1 AA 1 DD
2 BB 2 EE
3 CC 3 CC
1 DD 1 DD
2 EE 2 EE
5 CC 5 CC
now AGAIN check and update gor ---- if the roll_upname is same and roll_upid is multiple take maximum
i need another Update statement for this
thus final table after the 2nd update wshould be like this
sou_id sou-name rool_upid roll_upname
1 AA 1 DD
2 BB 2 EE
3 CC 5 CC
1 DD 1 DD
2 EE 2 EE
5 CC 5 CC
please help as soon as psossible i need it
thanx in advance