I am running MSSQL 2K SP3 and using a very simple select statement to grab some files from a table:
The datatype for the field is smalldatetime and I've tried several combinations of dates and times, and even used the LIKE operator. The only way I can get it to work is to use the BETWEEN operator and check for the day before and the day after.Code:SELECT * FROM [Hours] WHERE InputDate = '11/16/2004' AND CType = 1 AND ReadNum = 2 ORDER BY CellID
Why isn't this working??? And yes, there are records with that date and the records meet the other clause needs. If I take the date portion out, it works but grabs more data than I want.
![]()




Reply With Quote