我的案例表达式出现错误。我只想评估一个条件,并返回正确的语句。但是我在“as”附近不断收到语法错误。
这是我所拥有的:
left outer join (
SELECT wbs1, wbs2, wbs3
, case
when (ProgramAffiliation = magrann.[programAffiliation_AEP/COHesh2010]())
then '[AEP] as ''AEP1'''
else [AEP Base] as 'AEP1'
end
, [AEP:Non-Compliant Mechanical Ventilation] as 'AEP2'
, [AEP - Non Energy Star AC ($90 deduction)] as 'AEP3'
, [AEP: Bonus] as 'AEP4'