I am trying to join all the elements in one table to a portion of another table. The join happens, then the restrictive where clause; I am trying to get the restrictive where clause to run first, then the join.. I want to filter out the stuff I don't want from tables AL2 and AL3, and THEN join them to AL1 with an outer join. If I put (+) next to the AL2 and AL3 and clauses, the query works, but it will not let me save the format (it eliminates the (+)'s. What is the current version of SQL syntax for this?
SELECT AL1.PORTFOLIO_CODE,
AL2.PORTFOLIO_GROUP_ID,
AL1.PORTFOLIO_NAME,
AL1.PORTFOLIO_TYPE_CODE,
AL3.CODE_DESCRIPTION
FROM A.ENTITY_VIEW AL1, A.ENTITY_LIST_VIEW AL2, A.CODES_VIEW AL3
WHERE (AL1.PORTFOLIO_CODE = AL2.PORTFOLIO_CODE(+))
AND (AL1.ENTITY_ID_UNTRIMMED = AL3.CODE_VALUE(+))
AND ( ( AL2.PORTFOLIO_GROUP_ID ='DLYPRICE' Note: can add (+) after ID and it works.
AND AL3.CODE_INTERFACE ='PROD ') Note: same here after interface
AND AL3.CODE_TYPE_SHORT_DESC ='PORTPRICSRCE ') Note: same here after desc