Can anyone help me? This thing is driving me up the wall!
I spent all yesterday afternoon working out how to create a new user in Microsoft SQL (use stored procedure "sp_adduser" for anyone who finds themselves in this situation!) then, when I logged in as this new user, the damned thing started giving me grief executing a SELECT query using dates...
![]()
![]()
![]()
![]()
![]()
I am trying to execute this query:
.. and I get the following error:Code:SELECT * FROM meetings WHERE [date] > '15/09/2004 15:00:07' AND [date] < '15/11/2004 15:00:07';
Code:Microsoft OLE DB Provider for SQL Server error '80040e07' The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
So, I tried removing the apostrophes:
Code:SELECT * FROM meetings WHERE [date] > 15/09/2004 15:03:06 AND [date] < 15/11/2004 15:03:06;
.. and got the following error:
Code:Microsoft OLE DB Provider for SQL Server error '80040e14' Line 1: Incorrect syntax near '15'.
WHAT IS GOING ON ??!
the column [date] is formatted as datetime
I'm using Microsoft SQL Server v8.
If anyone has any ideas, I would be really grateful for some help. This thing has been driving me mad!!








Bookmarks