I'm trying to convert some Oracle SQL code to regular SQL and am having trouble with the numerous variables in the SELECT statement, tables in the FROM statement, and (+) WHERE statements.
I have looked through similar posts but all provide simple examples with just 2 variables, 2 tables, and 1 (+) WHERE statement. I'm not sure how to apply what I'm seeing from the other forum posts to multiple variables, tables, and (+) WHERE statements.
SELECT
a.ID,
c.var1,
d.var2
FROM a, b, c, d, x, y
WHERE a.ID(+) = b.ID
AND c.var1(+) = b.var1
AND x.id(+) = y.id;
I tried to convert all the (+) WHERE statements to LEFT JOINs as shown below. I did 3 LEFT JOINS, one for each (+) WHERE statement:
SELECT
a.ID,
c.var1,
d.var2
FROM a, b, c, d, x, y
WHERE b.ID in
(SELECT b.ID
FROM b
LEFT JOIN a
ON a.ID = b.ID)