Receiving this error in SQL Server 2000 when trying to do an insert from one database to another on the same server. The columns on both tables are smalldatetime and allow nulls.
In short, my code is:
INSERT INTO DB2..Table2
SELECT BirthDate, RefDate, Email, FirstName, LastName, ExitDate
FROM DB1..Table1
And the error is:
Msg 295, Level 16, State 3, Line 1
Syntax error converting character string to smalldatetime data type.
Why am I getting this error when the source is a smalldatetime?
It will be better and less-error-prone if you spelled out the columns explicitly
You received the error probably because the columns order did not match the ones in the second table, string matching against date. When you spell it out like I did, you can always cross-check