Can someone rewrite my outdated SQL query for me in IMPLICIT JOIN FORMAT? I am u
ID: 3663002 • Letter: C
Question
Can someone rewrite my outdated SQL query for me in IMPLICIT JOIN FORMAT? I am using ORACLE DATABASE SQL Developer. I have the correct query for both explicit and implicit syntax down for this query, however I need to re-write the implicit join query (Option 2 below) because as you can see, it uses the deprecated *= syntax, and the professor won't accept that, so please rewrite the query using modern SQL language.
Instructions:
Here are the two correct queries I have written, the output of the one you post should be identical to the output of these two (Option 1 is using explicit join syntax and Option 2 is using Implicit Join syntax):Link if you can't see it http://i.imgur.com/r7N3fp8.png
And here is the database information, not quite sure if that will be useful to you since I just need my query to be re-written:
Please help,
Thank you.
Explanation / Answer
Answer)
--PRINT ‘Option 2 – Implicit join using the new syntax ’ + CHAR(10)
--GO
--SELECT SALESPERSONS.EnameAS ‘Implicit join’
--FROM SALESPERSONS, ORDERS
--WHERE SALESPERSONS.EmpID(+) = ORDERS.EmpID
--GROUP BY SALESPERSONS.Ename
--HAVING COUNT(ORDERS.EmpID) = 0
--ORDER BY SALESPERSONS.Ename DESC;
--GO
--IN THIS OPERATOR (+) IS BEING USED AS IMPLICIT OUTER JOIN SYNTAX IN PLACE OF *=