Home » SQL & PL/SQL » SQL & PL/SQL » Join and select help
Join and select help [message #396558] Tue, 07 April 2009 03:52 Go to next message
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
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?

Re: Join and select help [message #396606 is a reply to message #396558] Tue, 07 April 2009 05:48 Go to previous message
Michel Cadot
Messages: 65085
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I don't get the results I need

How could we know when we don't know your model and data?

Previous Topic: ORA 600 error
Next Topic: How To reterive the record counts
Goto Forum:

Current Time: Mon Jul 24 10:09:50 CDT 2017

Total time taken to generate the page: 0.05935 seconds