sql query [message #417836] |
Tue, 11 August 2009 13:29  |
joe345
Messages: 4 Registered: August 2009
|
Junior Member |
|
|
Im trying to get all the records for the current date (todays)
my column field is set as date and a record is shown as
id filepath dldate userid
4 df//fdfdfd 09-08-11 pjoe
my query is
select count(userid) as downloadstoday
from downloadfilestats
where dldate = to_char(sysdate,'yy/mm/dd')
but im getting this error
Error Executing Database Query.
[Macromedia][Oracle JDBC Driver][Oracle]ORA-01843: not a valid month
Does anyone know whats wrong with the query?
thx
|
|
|
|
|
|
Re: sql query [message #417841 is a reply to message #417836] |
Tue, 11 August 2009 13:50  |
 |
Michel Cadot
Messages: 68761 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version with 4 decimals.
Regards
Michel
|
|
|