Hi,
I am trying to replace the Delete statement because it causedperformance issue and take up CPU. I try to replace the using 'NOT IN' I am not sure anybody has any advice for me. Thanks.
delete from @AA
where orderid not in
(
select max(orderid) as orderID
from @AA
group by BaseID
I am trying to replace the Delete statement because it causedperformance issue and take up CPU. I try to replace the using 'NOT IN' I am not sure anybody has any advice for me. Thanks.
delete from @AA
where orderid not in
(
select max(orderid) as orderID
from @AA
group by BaseID