sql - mysql SELECT IF statement with OR -



sql - mysql SELECT IF statement with OR -

the next works - returns y when chargeback equal 1 else defaults n

if(fd.charge_back = 1, 'y', 'n') charge_back

however cannot seem 1 working? syntax valid

if(compliment = ('set' or 'y' or 1), 'y', 'n') customer_compliment

presumably work:

if(compliment = 'set' or compliment = 'y' or compliment = 1, 'y', 'n') customer_compliment

mysql sql select if-statement

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -