update LicenseSubscriptionDetail
set SubscriptionValidFrom = '2017-09-11 00:00:00.000', SubscriptionValidThrough = '2019-09-11 23:59:59.997'
WHERE LicenseId in
(SELECT Id from License where InstitutionName = 'WKLabGuide1replacement') 
and (SubscriptionValidFrom='2014-01-24 00:00:00.000' and SubscriptionValidThrough='2017-06-27 00:00:00.000')

update License set IsActive=1 
where id in (
SELECT LicenseId FROM LicenseSubscriptionDetail
WHERE LicenseId in
(SELECT Id from License where InstitutionName = 'WKLabGuide1replacement') 
and (SubscriptionValidFrom='2017-09-11 00:00:00.000' and SubscriptionValidThrough='2019-09-11 23:59:59.997'))