Why this query does not work?
Hello,
I really got confused with following simple query. Please note this query doesn't work (I use TOAD and SQL Developer to run it):
select *
from ap.ap_suppliers
where end_date_active is null
and vendor_id not in (select vendor_id from po.po_headers_all where last_update_date > sysdate - 282)
Nothing returned but there is no error.
However if I change the number from 282 to 281, it works and I get data back. so the limit there seems like 281.
Even more strange thing is that if I modify the query by using a different table (from po_headers_all to ap_invoices_all) in sub-query, the number won't matter anymore and I get data back: