Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can I use a WITH clause reference in a JOIN?

user11951344Sep 22 2015 — edited Sep 23 2015

Is the below query syntactically correct?

WITH abc AS

(

SELECT a.col1 d,

               a.col2 e,

               substr(a.col1,2) f

FROM   table1 a JOIN

             table1 b ON a.col1 = b.col1

WHERE a.col2 != b.col2

)

SELECT id, name, ssn, dob

FROM table3 LEFT OUTER JOIN (SELECT DISTINCT abc.d FROM abc WHERE abc.f = 'EF')   /* please note the WHERE clause addition in the inline veiw */

ON table3.id = abc.d

I am trying to use 'abc' with a JOIN. Are there any WITH clause limitations?

Thanks!

Message was edited by: user11951344

This post has been answered by Frank Kulash on Sep 23 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 21 2015
Added on Sep 22 2015
17 comments
3,112 views