The below script is very useful when upgrade aspdotnetstorefront from 7.x.x.x to 8.x.x.x version. (from low version to high version)
The Aspdotnetstorefront already provide the db upgrade script, but the problem is after run the script, I found that some stringresource value is missed.
So, I created the below script to find out the difference between 8.x and 7.x(between two resource) and repair these losted resource.
use aspdotnetfrontstore.com -- select the 8.X.X.X database you will copy from
go
if(object_id('tempdb..#temp') is not null)
drop table #temp
go
select * into #temp from StringResource --select data from 7.0 into tempTable
go
use spqdev.com -- select the 7.0 database you will copy to
go
if object_id('StringResource','U') is not null
begin --- if haved table
insert into StringResource
select StringResourceGUID,[Name],LocaleSetting,ConfigValue,Modified,CreatedOn
from #temp where [Name] not in (select [Name] from StringResource)
end
else -- if not table
select * into StringResource from #temp --clone table
go
delete #temp