Let's say we have the table "letters" like so:
a | b
-----
0 | 0
0 | 1
1 | 0
1 | 1
And the following select statement:
SELECT val1, val2, x.a. val3
FROM table1,
table2,
(SELECT a
FROM letters
WHERE a=b
AND a=0) x,
table3
WHERE table1.val1 = table2.val1
AND table1.val2 = table3.val3
I need the embeded SELECT statement (x) to return:
0
NULL
NULL
NULL
Instead of what is currently returning which is
0
Then I want to be able to use that in the big SELECT statement. I hope this makes sense!
table1,table2, andletters. Your question only mentions one table. Fix the question. It might also help if you explain what you are trying to do, because there are no doubt better queries.JOIN?