以下工作-退款等于1时返回Y,否则默认为N

IF(fd.charge_back = 1, 'Y', 'N') AS charge_back


但是我似乎无法使这一工作正常?语法有效吗

IF(compliment = ('set' OR 'Y' OR 1), 'Y', 'N') AS customer_compliment

最佳答案

大概这可以工作:

IF(compliment = 'set' OR compliment = 'Y' OR compliment = 1, 'Y', 'N') AS customer_compliment

07-27 21:21