Reputation: 8033
I am trying to update a table in a server(ServerA) using a linked share connection from ServerB and i Got the below Error
The OLE DB provider "SQLNCLI10" for linked server "ServerA" could not UPDATE table "[ServerA].[MyDb].[dbo].[tbl_name]" because of column "CreateDt". Conversion failed because the data value overflowed the data type used by the provider.
This is the query I Used :
update [ServerA].[MyDb].[dbo].[tbl_name]
set transfer_fl = 1,
CreateDt = getdate()
where transfer_fl<>'1'
the column CreateDt is of data type smalldatetime and it already has a value in it.
Can somebody give explain me why this happens.
Upvotes: 0
Views: 615
Reputation: 334
This is a bug in SQL 2008/R2.
Unluckily it is marked as won't fix and you would have to do an explicit conversion.
Upvotes: 1
Reputation: 48177
Sintaxis
GETDATE ( )
Tipo de valor devuelto
datetime
no smalldatetime
Here is more detail explain of the SQL Server Error Messages - Msg 298
Upvotes: 0