更新语句问题(大侠们帮我看看)
update schdule set isSelected= '0 ' where isSelected not in(select catalogID= '02010000 ', catalogID= '02020000 ', catalogID= '02030000 ' from schdule where userID = '0000000 ')
不能执行!我想更新schdule表中catalogID= '02010000 ', catalogID= '02020000 ', catalogID= '02030000 ' 这三个字段的状态为1,其余为0.(这个表里初始状态都为1的)
T T大家帮帮忙
------解决方案--------------------update schdule set isSelected=(case when Charindex( ', '+catalogID+ ', ',
',02010000,02020000,02030000, ')> 0 then '1 ' else '0 ' end)
------解决方案--------------------update schdule set isSelected= '0 ' from schdule where catalogIDnot in( '02010000 ', '02020000 ', '02030000 ') anduserID = '0000000 '
------解决方案--------------------update schdule set isSelected= '0 ' where isSelected not in( '02010000 ', '02020000 ', '02030000 ')
------解决方案--------------------手都快的很,