SQL Server Error: maximum number of prefixes. The maximum is 3.

Posted by Ian Boyd on Stack Overflow See other posts from Stack Overflow or by Ian Boyd
Published on 2010-03-08T20:28:20Z Indexed on 2010/03/08 20:36 UTC
Read the original article Hit count: 252

Trying to run a cross-server update:

UPDATE cmslive.CMSFintrac.dbo.lsipos
SET PostHistorySequencenNmber = (
    SELECT TransactionNumber 
    FROM Transactions 
    WHERE Transactions.TransactionDate = 
         cmslive.CMSFintrac.dbo.lsipos.TransactionDate)

Gives the error:

Server: Msg 117, Level 15, State 2, Line 5
The number name 'cmslive.CMSFintrac.dbo.lsipos' contains more than 
the maximum number of prefixes. The maximum is 3.

What gives?


Note: Rearranging the query into a less readable join form:

UPDATE cmslive.CMSFintrac.dbo.lsipos
SET PostHistorySequenceNumber = B.TransactionNumber
FROM cmslive.CMSFintrac.dbo.lsipos A
    INNER JOIN Transactions B
    ON A.TransactionDate = B.TransactionDate

does not give an error.

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about sql-server-2000