Thanks. Can you tell me why this query:SET DATEFormat DMYSELECT TOP 10 *FROM tblCustomFieldValuesWHERE CustomFieldDefinitionKeyID = 11AND CAST(CustomFieldValue AS DateTime) >= '2008-03-01'AND CAST(CustomFieldValue AS DateTime) <= '2008-03-30'
Returns this error:Server: Msg 242, Level 16, State 3, Line 2The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
???Seems I can only use one CAST statement for comparison or something? If I run it alone without the second AND, it is fine. I tried a BETWEEN with the same results.