I have a query like this:
select pln.*
from plan pln
where pln.id = '0003'
and pln.seq = (select max(pln_es.seq)
from plan pln_es
where pln_es.id = pln.emplid
and pln_es.career =pln.career
and pln_es.nbr = pln.nbr
and pln_es.dt = pln.dt)
However, if I do (Select Column...), using the same conditions, it does not return data! Makes no sense to me.
Here's the query that Does Not return results:
select pln.MYDATE
from plan pln
where pln.id = '0003'
and pln.seq = (select max(pln_es.seq)
from plan pln_es
where pln_es.id = pln.emplid
and pln_es.career =pln.career
and pln_es.nbr = pln.nbr
and pln_es.dt = pln.dt)
Does anyone know why could this be happenning? The column per se is a Date, and the DB is Oracle 10g