嗨,我正在尝试一起计算某些列的值,并且取决于列是否为某个值
if lens.qty > 1 then (CASE LENS.LNS_PROGTYPE --DESIGN pOINTS
WHEN 762
THEN 70
when 767
THEN 70
when 768
THEN 70
WHEN 841
THEN 35
WHEN 842
then 35
else 0
end +
case LTRIM(RTRIM(LENS.COATTYP)) --ARC POINTS
when 'HVLL'
then 50
when 'HVLLBLUE'
then 100
else 0
end +
CASE LENS.LNS_IDX --MATERIAL POINTS
when 53
THEN 35
WHEN 56
THEN 35
WHEN 58
then 35
when 61
then 35
else 0
END +
CASE LENS.LNS_MATCLR --COLOR POINTS
WHEN 00
THEN 0
WHEN 46
THEN 35
WHEN 47
THEN 35
WHEN 48
then 35
else 0
end as TOTAL_POINTS)*lens.qty / 2
else
CASE LENS.LNS_PROGTYPE --DESIGN pOINTS
WHEN 762
THEN 70
when 767
THEN 70
when 768
THEN 70
WHEN 841
THEN 35
WHEN 842
then 35
else 0
end +
case LTRIM(RTRIM(LENS.COATTYP)) --ARC POINTS
when 'HVLL'
then 50
when 'HVLLBLUE'
then 100
else 0
end +
CASE LENS.LNS_IDX --MATERIAL POINTS
when 53
THEN 35
WHEN 56
THEN 35
WHEN 58
then 35
when 61
then 35
else 0
END +
CASE LENS.LNS_MATCLR --COLOR POINTS
WHEN 00
THEN 0
WHEN 46
THEN 35
WHEN 47
THEN 35
WHEN 48
then 35
else 0
end as TOTAL_POINTS)
我不断收到语法错误,我不确定我哪里出错了我不知道该怎么做,老实说我不完全理解我看过的例子你的帮助将不胜感激