update ent_subscription
set ent_subscription = convert(char(20),dateadd(yy,datediff(yy, ent_subscription, '2008-10-01 00:00:00.000'),ent_subscription),112 )
where ent_subscriptionid in
(
select expdate.ent_subscriptionid
from subscription s
inner join ent_subscription cty on s.subscriptionid=cty.f_subscription
and cty.f_type_ent_subscription=15
inner join ent_subscription expdate on s.subscriptionid=expdate.f_subscription
and expdate.f_type_ent_subscription=30
where cty.ent_subscription = '47'
and datediff(mm, expdate.ent_subscription, '2008-10-01') > 0
)
Alltihop fungerar jättebra utom just att uppdatera. Hur kan jag uppdatera where id = något av id'na i min select statement? Om jag specificerar ett av id'na med