Forums

This topic is locked

Is there a Minus or except operator or similar?

Posted 26 Mar 2002 03:35:36
1
has voted
26 Mar 2002 03:35:36 b w posted:
I need to select all the employee ID's and subtract them with the employee id's that have their fixed salary info completed.
And whatever is left would be the recordset that the list menu can choose from.

Here is what I have so far but I keep on getting an error near the minus.

SELECT employee.employeeid FROM employee WHERE division='M'
Minus
(SELECT Fixed_Salary_Amount.employeeid
FROM Fixed_Salary_Amount,employee
WHERE Fixed_Salary_Amount.employeeid=employee.employeeid AND division='M')

SQL server 2000, asp, windows 2000 server

I think minus is an oracle term. Is there something similar in sql 2000?

It's ok. I got it to work.

used the "not in" and got the desired results.


SELECT employee.employeeid FROM employee WHERE division='K' and employee.employeeid not in (SELECT employee.employeeid
FROM Fixed_Salary_Amount,employee
WHERE Fixed_Salary_Amount.employeeid=employee.employeeid)


Edited by - biffysix on 26 Mar 2002 06:30:43

Reply to this topic