Hi how can I create sql statement for this that will produce yes and no value in alias column , I want to get all the list of user and user that is in the monitor table,and create alias column of monitor
if the user_id is in the monitor table then the value of this is “yes” if not “No”,
is this possible ?
Thank you in advance.
I have this table.
**USER-TABLE**
USER_ID FNAME LNAME USER_TYPE_ID
100 Michelle SMITH 1
101 LISA JOHNSON 2
103 SUSAN JONES 2
104 KAREN DAVIS 2
105 LISA GARCIA 2
106 JANE MILLER 2
107 ANNALIZA ANDERSON 2
108 SHANE ALBAS 2
MONITOR-TABLE
ID USER_ID ADDED-BY
1 105 100
2 108 100
how can I output like this ?
USER_ID FNAME LNAME MONITOR
101 LISA JOHNSON NO
103 SUSAN JONES NO
104 KAREN DAVIS NO
105 LISA GARCIA YES
106 JANE MILLER NO
107 ANNALIZA ANDERSON YES
108 SHANE ALBAS NO