Here is my request:
Select a.* from Table1 a, Table2 b
Where
a.tid=b.tid and
b.createddate=(Select max(createddate) from Table2) and
a.tid not in (Select distinct tid from Table3);
The problem is that I know that this should return some valid output, but that is not the case. The problem with the last line in a.tid not in (select excellent tid Table 3); , if I replace the Select select tid from table 3 with hard-coded values, for example ('T001', 'T002', 'T003', 'T004'), then it works fine and returns the data.
What's wrong? Am I missing something? Please, help.
source
share