Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Finding period NOT in a table
Is there an easy way to find which of a set of numbers isn't in a
table? I'm trying to find financial periods that are missing from a
set of data. I can do it if I have a table which just contains the
valid period numbers 1- 12 in the following way:
SELECT
period_num
FROM
valid_periods
WHERE
period_num NOT IN (SELECT DISTINCT data_period FROM data_table)
But is there a simple way to do it without the valid_periods table? Received on Tue Aug 21 2007 - 09:14:22 CDT
![]() |
![]() |