SQL query replacing not in

Tags:
SQL
SQL Query
I wrote this query with not in replace the not in with not exist.
SELECT LASTNAME , TITLE
FROM NOR_EMPLOYEES 
WHERE EMPLOYEE_ID not in
(SELECT E1.EMPLOYEE_ID FROM NOR_EMPLOYEES E1,NOR_EMPLOYEES E2
WHERE E1.EMPLOYEE_ID=E2.REPORTS_TO);


Software/Hardware used:
sql
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TheRealRaven
    Why? What problem are you having with doing it? Hard not to see this as homework/interview question.
    35,660 pointsBadges:
    report
  • carlosdl
    If they told you to replace NOT IN with NOT EXISTS, then you should obey and do it, and see what happens.

    If you find any specific problem when doing it, feel free to post your doubt here.
    84,805 pointsBadges:
    report
  • ToddN2000
    Is this a homework question? Have you tried the code? Any errors?
    133,790 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: