December 5, 2001 at 8:51 am
I use statements like the one below where I select all the possible records
I may require and then filter by using "not in" and going off looking at
another table. The statement below works fine and returns over 400 rows but
if I change the '2001-05-31' for '2001-05-30' it returns no rows. There is
only 100 records in the second table for '2001-05-30' so I should at least
see 300 records but in reality non of the records on the '2001-05-30' are
significant to the top table.
Has anyone seen strange behavoir like this before . . . we even rebooted the
box.
select rcc..tours.arealead, *
from rcc..tours
where tourdate between '2001-11-21' and '2001-11-25'
and promotion = 613
and rcc..tours.status in (2, 4)
and rcc..tours.arealead
not in
(
select arealead
from sunseekers..vouchers
where enterdate >= '2001-05-31'
)
December 5, 2001 at 9:09 am
solved it! - there was a NULL record before that date which knocked out the IN!
December 5, 2001 at 11:32 am
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply