Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"more than the maximum number of prefixes"

Status
Not open for further replies.

LeonAtRC

Programmer
Nov 25, 2002
101
US
I'm trying to update records in a table on a remote server but I keep getting an error about too many prefixed in the WHERE clause.
Code:
UPDATE RemSVR.RemDB.dbo.People 
	SET OfficeID = Corporate.OfficeNMBR
	FROM Corporate
	[COLOR=blue]WHERE RemSVR.RemDB.dbo.People.OfficeFloor[/color] = Corporate.OfficeFloor
Can someone figure a work-around?
Thanks
 
This is where table aliases come in VERY handy.

Code:
UPDATE [!]People[/!]
SET    OfficeID = Corporate.OfficeNMBR
FROM   RemSVR.RemDB.dbo.People As [!]People[/!]
       Inner Join Corporate
         On [!]People[/!].OfficeFloor = Corporate.OfficeFloor

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top