I'm just wondering if this is possible:
can you do a select so that if the select statement returns a number (1 or 0) it displays specified text in the results field?
example:
select emp, position, if(primary_indicator=1, 'yes', 'no')
from employees
So what i am trying to do here is replace the the primary position indicator with a 'yes' if its 1 in the table, or a 'no' if anything else. I know you could do some transact SQL, but im just wondering here...
Thanks
can you do a select so that if the select statement returns a number (1 or 0) it displays specified text in the results field?
example:
select emp, position, if(primary_indicator=1, 'yes', 'no')
from employees
So what i am trying to do here is replace the the primary position indicator with a 'yes' if its 1 in the table, or a 'no' if anything else. I know you could do some transact SQL, but im just wondering here...
Thanks
