We help IT Professionals succeed at work.
Get Started

what can I use in SQL 2000 for "Not in" command that works only in SQL2005

obrech asked
Last Modified: 2012-05-07
I cannot run this script in the SQL server 2000. The not in does not exist in SQL2000. What statement can I run instead.  i need to retrieve  records only from tblemp table that do not exists in ActiveDirectoryAllUsers table.
can you please write the example for me ( I am not a programmer)

I have the following error when I run this statment "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."

Thank you.

select emp_no, emp_Fname, emp_Lname, emp_MI 
from tblemp
where emp_no not in
(select emp_no, emp_Fname, emp_Lname, emp_MI 
from tblemp as e, ActiveDirectoryAllUsers as a
where e.emp_no = a.employeeID 

Open in new window

Watch Question
Awarded 2008
Awarded 2008
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE