Help! Where clause using TO_DATE [message #374092] |
Thu, 24 May 2001 10:54 |
Mhoward
Messages: 4 Registered: May 2001
|
Junior Member |
|
|
I am need of your help. I m using Oracle 8.05 and have a fairly simple query that returns a count of records added on the current date. (adddate field)
So far, the only way I can get it to work is using a date specific clause of:
WHERE adddate >= TO_DATE('24-may-2000','dd-mon-yyyy')
I want to use SYSDATE so that I can use the statement in ASP pages and not have to manually find/replace the hard coded date. However, when I use sysdate in place of the actual date in the TO_DATE conversion, I get different record counts. Why? What should I use to product the same results as hard coding the specific date? I have been working on this one for some time without any success.
Here is the sysdate clause I have attempted to use:
WHERE adddate >= TO_DATE(sysdate,'dd-mon-yyyy')
Any ideas?
Thanks,
Mitch
|
|
|
|
|
|
|
|
|
|
|
|