tags:

views:

145

answers:

1

Hi Guys.

I'm currently experiencing what I believe is strange behavior when using Oracle with TOAD.

I have a query:

SELECT
     COUNT(as_at_date)
FROM
     job_log
WHERE
     as_at_date = TO_DATE('24/11/2009', 'dd/mm/yyyy');

When I try to run this using Toads 'Execute statement' button I get zero rows returned. However when I use 'Execute as script' I get one row returned, which is as expected.

Can anyone explain to me why using the different commands would produce differences in the result set?

Thanks.

A: 

It's not an direct answer to your question (and it will take you a moment or two to setup and analyse), but you could take a TKPROF trace in the database to see what actually arrives from Toad....

See

http://www.jlcomp.demon.co.uk/tkprof_01.html

and

http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:969160000346108326

for some examples.

davek
Thanks Davek, I'll try this out tomorrow and get back to you.
fras85