I am trying to concatenate values from multiple fields using concat_ws. One of the fields (is_logged) contains only the values 0 or 1. I want to concatenate yes if the value of is_logged field is 1 and no otherwise.
E.g. -
concat_ws('', month,'-', year, ',Logged-', is_logged) info
Current output - Dec - 2020,Logged-1
Expected output - Dec - 2020,Logged-Yes
How can this be achieved? Thanks!
can be different in different dbms but you can do this: