Reputation: 150
I am implementing a left outer join with the customer table and am joining it with the payroll table. I am having trouble with Oracle recognizing that I only want the employees that are not current on their audits.
SELECT e.E_Name, e.Phone
FROM E_Name.Employee AS e
LEFT OUTER JOIN E_Name.Payroll AS p
ON e.E_Name = p.E_Name
WHERE p.audit != 'current';
My error:
SQL Error: ORA-00933: SQL command not properly ended
How do I solve this?
Upvotes: 0
Views: 112
Reputation: 22949
Assuming that you have columns with the same name of your schema (E_Name
), you simply have to remove the as
:
SELECT e.E_Name, e.Phone
FROM Employee e
LEFT OUTER JOIN Payroll p
ON e.E_Name = p.E_Name
WHERE p.audit != 'current';
Upvotes: 2