SQL语句求解
select c.sLSight from D_PatientCaseInfo c where c.nPID='1503571' 这个语句 查询到结果:
0.05 0.6
指数 0.4
查询结果正确,但是为什么接下来的查询语句就出问题了?select
(case when (sLSight = '指数') then '0.001'
when (sLSight = '手动') then '0.002'
when (sLSight = '光感') then '0.003'
when (sLSight = '无光感') then '0.004'
when (sLSight = '不配合') then '0.005'
when (sLSight = '义眼') then '0.006'
else 0 end) as '左眼视力,
(case when (sRSight = '指数') then '0.001'
when (sRSight = '手动') then '0.002'
when (sRSight = '光感') then '0.003'
when (sRSight = '无光感') then '0.004'
when (sRSight = '不配合') then '0.005'
when (sRSight = '义眼') then '0.006'
else 0 end) as '右眼视力 from D_PatientCaseInfo c where c.nPID='1503571'
查询的结果为什么都是
0 0
0 0呢?