I have a sql server linked server to access an informix database, and I'm using openquery to run the queries, and then insert the results in a sql server table.
The problem is that when I run a code like:
INSERT INTO table_name
( date, comments, user )
SELECT f.date
, f.comments
, f.user
FROM OPENQUERY( LINKED_SERVER_NAME,
'select date
, description as comments
, user_name as user
from tsperson'
) AS f
I got this error:
"The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value."
I've already tried to cast but that doesn't worked.
I've searched here and in Google for some answer but not founded.
So, can someone help me?