Join and select help [message #396558] |
Tue, 07 April 2009 03:52  |
greg27
Messages: 1 Registered: April 2009
|
Junior Member |
|
|
I have a query like this:
SELECT Employees.Names
FROM Employees, Transactions
WHERE Employees.Staff_No = Transactions.Staff
MINUS
SELECT Employees.Names
FROM Employees, Jobs, Authority
WHERE Employees.Category = Jobs.Id
AND Jobs.Id = Authority.Id;
Basically I'm trying to get a list of employees who performed a transaction that they're not authorised to do. My problem is that, unless I select a column from the Transactions table in the first query and a column from the Authority table in the second query, I don't get the results I need. However I only want the statement to the Names column from the employees table.
Any ideas?
Cheers.
|
|
|
|