- 论坛徽章:
- 0
|
select convert(char(30), co.name) 'ID',
(case
when co.status &128 = 128 then
'Act/Del'
when co.status &64 = 64 then
'Pend/Act'
when co.status &32 = 32 then
'active'
end) '02.10.05.01',
(case
when co.status &1 = 1 then
'Default'
when co.status &4 = 4 then
'Log Only'
when co.status &2 = 2 then
'Mixed'
end) '02.10.05.02',
str(round(convert(numeric(20, 9), co.value) / 1024, 2), 10, 2) '02.10.05.03',
str(round(convert(numeric(20, 9), cu.value) / 1024, 2), 10, 2) '02.10.05.04'
from master.dbo.sysconfigures co, master.dbo.syscurconfigs cu
where parent = 19
and co.config = cu.config
and co.name = cu.comment
and co.config = 19
Server Message: Number 102, Severity 15
Line 3:
Incorrect syntax near 'when'.
版本小于12.1.5,只知道12.1.5以下不支持嵌套查询,难道也不支持CASE……WHEN……?
如果不知道,如果实现上述功能? |
|