我无法选择一个字段并需要帮助。
WHEN dpav.isprimary = 1
THEN ct.accountnum
ELSE concat (ct.accountnum,'_',dpav.zipcode)
END 'Customeraccount'
在FROM子句之前,我想再次选择 case 子句(Customeraccount)
case
when DeliveryAddresses <> '' or ct.INVOICEACCOUNT = '' then 'Yes'
when DeliveryAddresses <> '' or ct.INVOICEACCOUNT = ''
and Customeraccount LIKE '%[_]%' then 'No'
else 'No'
end 'KeyAccount'
我尝试使用引号('Customeraccount'),但它不起作用。