I find inner joins to be very hard to read. SQL Developer has a feature to remove inner joins. Don't remember what it is called since I have not used SQL Developer in awhile. Is there some feature in toad to do this? I thought something in this menu would help.
Can you provide a before and after SQL that demonstrates what you're looking for? You may be looking for Toad's "Remove subqueries" items shown in your rt-click menu. It will flatten a SQL statement that contains nested SELECT statements.
Would be good to see an example of before vs after, like Michael replied.
I wonder if you're referring to ANSI vs Oracle syntax where it relates to join clauses?
I, too, prefer the easier to read Oracle syntax where join conditions are in the WHERE clause, rather than in the FROM clause with ANSI syntax.
Note that in both the Query Builder and Editor of Toad, you can switch between these two coding standards... as your screen snap shows via right-click, and the one below also.
I do not have the knowledge know what it is supposed to look like after.
Yes. That is exactly what I tried to use to get rid of the inner joins. It did not get rid of the inner joins.
An INNER JOIN selects records from two tables that have matching values in both tables. You can read about them here. It affects the results returned by the query.
Since you have mentioned readability I am thinking you are referring to something other than an inner join. Can you post an example query you would like to refactor and highlight the portions of it you want to remove?
select a.champs, b.register, b.something from table1 a, table2 b
where a.champs = b.register should be the oracle best way
Select the SQL->Right-click -> Refactor->Convert to Oracle Join Syntax worked for me.
I just changed this:
SELECT DNAME, E.*
FROM JDORLON.EMP E INNER JOIN JDORLON.DEPT D
ON E.DEPTNO = E.DEPTNO
to this:
SELECT DNAME, E.*
FROM JDORLON.EMP E, JDORLON.DEPT D
WHERE E.DEPTNO = E.DEPTNO
If that doesn't work for you, post the SQL that you're trying to convert.
-John