update [dbo].[User] set [dbo].[User].Status =** p.StaffType ?'True':'False' ** from #v_interface_staff p
update #v_interface_staff set stafftype=case when stafftype='Inactive' then 'False' else 'True' end
[User].Status 的 值是 True False
p.StaffType 的 值是 Action Inactive
怎么修改之后 Action 对应 True
Inactive 对应 False
因为不能改变原有User表的数据值
status的数据类型是什么?
如果是数值型,要写成status=1
如果是字符型,要写成status='true',用单引号!