update select
update bucp..Core_Flow_Opinion set
useruid =(select user_uid from bua..bua_user b
where bucp..Core_Flow_Opinion.username=user_name) where case when
update bucp..Core_Flow_Opinion set
useruid =(select user_uid from bua..bua_user b
where case when patindex('%(%',username) >0 then left(username,patindex('%(%',username)-1) else username end =user_name) 给opinion_nodeid赋值
update Core_Flow_Opinion
set currentnodeid=( SELECT a.nodeid
FROM [BUCP].[dbo].[Core_Flow_Node] a
right join [BUCP].[dbo].[Core_Flow_Project] b
on a.flowid=b.flowid where Core_Flow_Opinion.projectid=b.id and Core_Flow_Opinion.currentNodeName=a.name)