i am trying to get record count between two dates
when i run the statement written below it gives me record count as 6 --- correct out put
SELECT COUNT(item_id) FROM tbl_items
WHERE item_id IN (SELECT distinct item_id FROM TBL_transactions
WHERE start_dt < 1186079100 AND end_dt >=1186079100);
where as when i include the same query in a procedure / function it returns record count as 7.
Please note the start_dt and end_dt have time in epoch format.
Can any one guide me why is this happening.
thanks in advance.