Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- update AnalysisLookup
- set isactive =0,
- Comments='same as id 93'
- where original in (select original
- FROM AnalysisLookup
- where original = 'monomeric SiO2')
- UPDATE
- M
- SET
- M.AnalysisLookupID = LTRIM(RTRIM(replace(comments ,'same as id ', '')))
- FROM
- [GroupsDetail] AS M
- INNER JOIN
- AnalysisLookup L
- ON
- M.[AnalysisLookupID] = L.[AnalysisLookupID]
- where M.AnalysisLookupid in (select AnalysisLookupid from AnalysisLookup
- where isActive = 0 and comments ='same as id 93')
- GO
- UPDATE
- M
- SET
- M.AnalysisLookupID = LTRIM(RTRIM(replace(comments ,'same as id ', '')))
- FROM
- AnalysesAdditionalLookupDetail AS M
- INNER JOIN
- AnalysisLookup L
- ON
- M.[AnalysisLookupID] = L.[AnalysisLookupID]
- where M.AnalysisLookupid in (select AnalysisLookupid from AnalysisLookup
- where isActive = 0 and comments ='same as id 93')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement