When I entered the code like shown below, I get back this error:
Msg 116, Level 16, State 1, Line 1
Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.
Code:
SELECT 
    E_ID, E_NAME, PROJECT, MANAGER
FROM 
    EMPLOYEE_PROJECT 
INNER JOIN 
    EMP_MASTER ON (EMPID = E_ID AND LOCATION = 'MUMBAI' AND 
                   E_ID NOT IN (SELECT * FROM SALARY_ADVANCE))
                Problem is here
 E_ID NOT IN (SELECT * FROM SALARY_ADVANCE))
You have to mention one column instead of all
The issue in this line:
E_ID NOT IN (SELECT * FROM SALARY_ADVANCE)
You should mention what field you check in this SELECT. Otherwise you get a table set not a set of values.
E_ID NOT IN (SELECT FIELD_NAME FROM SALARY_ADVANCE)
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With