表的联接更新
--表的联接更新
update b set TmpResourceID=a.TmpResourceID
from com_Resource b
inner join com_Resource a on b.ResourceID=a.ResourceID and b.LanguageCode='zh-cn'
where a.LanguageCode='en-us'
update b set TmpResourceID=a.TmpResourceID
from com_Resource b
inner join com_Resource a on b.ResourceID=a.ResourceID and b.LanguageCode='zh-cn'
where a.LanguageCode='en-us'
--要将ResourceID=1 and LanguageCode=zh-cn的TmpResourceID字段
--更新为ResourceID=1 and LanguageCode=en-us 的TmpResourceID字段相同
ResourceID Version LanguageCode ResourceValue TmpResourceID
1 MTRC en-us RecommendationAccident ARAccidentHead2
1 MTRC zh-cn 事故建议和跟进 NULL
posted on 2009-06-12 11:18 zengshunyou 阅读(159) 评论(0) 编辑 收藏 举报