使用链接服务器更新 Table 时出错
Error While updating Table using Linked Server
我正在尝试使用来自 ServerB 的链接共享连接更新服务器 (ServerA) 中的 table,但出现以下错误
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.
这是我使用的查询:
update [ServerA].[MyDb].[dbo].[tbl_name]
set transfer_fl = 1,
CreateDt = getdate()
where transfer_fl<>'1'
列 CreateDt 的数据类型为 smalldatetime,其中已有一个值。
谁能解释一下为什么会这样。
语法
GETDATE ( )
开发的勇气类型
datetime
没有小日期时间
的更详细解释
这是 SQL 2008/R2 中的错误。
不幸的是,它被标记为无法修复,您必须进行显式转换。
我正在尝试使用来自 ServerB 的链接共享连接更新服务器 (ServerA) 中的 table,但出现以下错误
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.
这是我使用的查询:
update [ServerA].[MyDb].[dbo].[tbl_name]
set transfer_fl = 1,
CreateDt = getdate()
where transfer_fl<>'1'
列 CreateDt 的数据类型为 smalldatetime,其中已有一个值。
谁能解释一下为什么会这样。
语法
GETDATE ( )
开发的勇气类型
datetime
没有小日期时间
的更详细解释这是 SQL 2008/R2 中的错误。
不幸的是,它被标记为无法修复,您必须进行显式转换。