尝试运行跨服务器更新:
UPDATE asilive.Contoso.dbo.lsipos
SET PostHistorySequencenNmber = (
SELECT TransactionNumber
FROM Transactions
WHERE Transactions.TransactionDate =
asilive.CMSFintrac.dbo.lsipos.TransactionDate)
给出错误:
Server: Msg 117, Level 15, State 2, Line 5
The number name 'asilive.Contoso.dbo.lsipos' contains more than
the maximum number of prefixes. The maximum is 3.
是什么赋予了?
注意:将查询重新排列为可读性较差的联接形式:
UPDATE asilive.Contoso.dbo.lsipos
SET PostHistorySequenceNumber = B.TransactionNumber
FROM cmslive.Contoso.dbo.lsipos A
INNER JOIN Transactions B
ON A.TransactionDate = B.TransactionDate
不给出错误。
也可以看看
- SQL Server 错误:最大前缀数。最大值为 3. with join syntax
(处理连接语法;本题处理子选择语法)