SQL Server Linked Server
All,
I am trying out a new linked server - I can run this command fine:
SELECT * FROM NextGen4.NGEPMWareHouse.dbo.Network_People
If I try to get fancy (update a table on my local server from the linked server)
UPDATE dbo.Network_People
SET dbo.Network_People.NGTimeStamp = NextGen4.NGEPMWareHouse.dbo.Network_People.[TimeStamp]
WHERE dbo.Network_People.HIN = NextGen4.NGEPMWareHouse.dbo.Network_People.HIN
I get
The num开发者_JAVA技巧ber name 'NextGen4.NGEPMWareHouse.dbo.Network_People' contains more than the maximum number of prefixes. The maximum is 3.
Try woking with UPDATE … FROM
and an alias.
UPDATE
dbo.Network_People
SET
NGTimeStamp = warehouse.[TimeStamp]
FROM
NextGen4.NGEPMWareHouse.dbo.Network_People AS warehouse
INNER JOIN dbo.Network_People AS people ON people.HIN = warehouse.HIN
Try to exclude ".dbo" prefix from your tablenames and use "update from"
精彩评论