DB interaction SQL
I am working on a JDBC program for which I am writing a query, now I know its not a SQL forum but I am hoping that somebody would be kind enough to put in a word or two.
Now when I run the following query
SELECT Count(*)
FROM ptedb.mon m, epay_msg.status st
WHERE to_char(m.pDATE,'DD-Mon-YY') >=to_char(st.tDATE,'DD-Mon-YY')
AND m.tdate > SYSDATE-7
however whn I run
SELECT Count(*)
FROM ptedb.mon m, epay_msg.status st
WHERE to_char(m.pDATE,'DD-Mon-YY') >=to_char(st.tDATE,'DD-Mon-YY')
it returns 7 results
and when I run
SELECT Count(*)
FROM ptedb.mon m, epay_msg.status st
WHERE m.tdate > SYSDATE-7
this also returns some results. So considering that I should get some no with the first query as well. Its really confusing me please advise.

