I am trying to query a date range on a single datedate field in sql 2000 db - the query below will not work if I do a search on say 21/07/2003 to the 21/07/2003, although there are records on for that day.
Can anyone help ??
WHERE ((([wa].date)>='start')) AND ((([wa].date)<='finish'));
hi donald, if you want assistance you can continue to post in the same thread and not post a new thread
You don't need all those parens to begin with, they don't hurt but it's messy. Perhaps you are confused on how these queries are run?
You should have the default database Pubs with table sales. These come standard with installation package.
run this query on it:
then run this query:
and finally this:
WHERE ord_date>='1994-09-13 00:00:00.000'
AND ord_date<='1994-09-14 00:00:00.000';
The reason your query probably isn't working: You also are using the name 'date' as one of your column names. 'Date' is a reserved keyword which is part of the grammar of the Transact-SQL language used to parse and understand Transact-SQL statements and batches. Although it is syntactically possible to use SQL Server reserved keywords as identifiers and object names in Transact-SQL scripts, this can be done only by using delimited identifiers.