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