Hi
Pls read the followings and help me.
Table "a" has the following data:
Table a:
========
-------------------
Col1 | Col2 |
-------------------
A1 | B1 |
-------------------
A2 | B2 |
-------------------
A3 | B3 |
-------------------
And table "b" has two column: Col1 and Col2, but has no data.
However, Pls read the following statement:
SELECT a.Col1, a.Col2 FROM a, b
WHERE a.Col1 = b.Col2
AND a.Col1 NOT IN ( SELECT Col1 FROM b)
If I execute this SQL statement, no record is retrived. But, I need to retrive three record and it should be happened.
On the other hand, if table "b" has a record as follows:
Table b:
========
-------------------
Col1 | Col2 |
-------------------
A3 | B3 |
-------------------
I can retrive two records by executing that SQL statement. In this case, there is no problem.
What should i do when table "b" has no data?
Waiting for your answer,
Thanks.
Wasim
Pls read the followings and help me.
Table "a" has the following data:
Table a:
========
-------------------
Col1 | Col2 |
-------------------
A1 | B1 |
-------------------
A2 | B2 |
-------------------
A3 | B3 |
-------------------
And table "b" has two column: Col1 and Col2, but has no data.
However, Pls read the following statement:
SELECT a.Col1, a.Col2 FROM a, b
WHERE a.Col1 = b.Col2
AND a.Col1 NOT IN ( SELECT Col1 FROM b)
If I execute this SQL statement, no record is retrived. But, I need to retrive three record and it should be happened.
On the other hand, if table "b" has a record as follows:
Table b:
========
-------------------
Col1 | Col2 |
-------------------
A3 | B3 |
-------------------
I can retrive two records by executing that SQL statement. In this case, there is no problem.
What should i do when table "b" has no data?
Waiting for your answer,
Thanks.
Wasim