以下工作-拒付金额等于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