I don't understand either. It says in the manual that you have to use Convert to _compare_ smalldatetime to a char and I saw the error. Yesterday a co-worker tried it out and he didn't get the error. I then tried to recreate it and I didn't get the error. I must have been in the twilight zone on Wednesday. 8-)
Actually, I think it might have been bad data. I found a couple records with a year 0978 instead of 1978 which will blow up in both smalldatetime and datetime. We decided not to go with smalldatetime since it will only go to the year 2079.
>>No. According to the Transact-SQL Reference on page 189 there is a table of the data conversions. When comparing a DateTime to Char is implicit but comparing a smalldatetime to Char is explicit.
>>DLC
>
>I don't understand. I ran the following from the QA and it worked ...
>
>create table mike (sdt smalldatetime)
>go
>insert into mike values ('1/1/1999')
>go
>
>-Mike