from the following data basis i need to select all IDQ‘s which do not have an entry for the 11.11.2011.
IDQ | DATE
----------------
1 | 08.11.2011
1 | 09.11.2011
1 | 10.11.2011
1 | 12.11.2011
1 | 13.11.2011
i can’t figure out how to express the sql
select
IDQ
from
TBL_WITH_IDQ T
where not exists ( DATE = '11.11.2011' ) // sql does not the job
Database is a Oracle 11g.
maybe someone can help me?
Try:
(Single pass solution) – if your original table is TBL_WITH_IDQ
On the other hand, if your original table is TBL_WITH_DATES and you want to include IDQs with no entries at all, I’d suggest this variant of Parkyprg’s solution: