Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 linked server & SQL error

Author  Topic 

matt_calhoon
Posting Yak Master

235 Posts

Posted - 2005-03-01 : 01:47:42
Hi there,

Im getting an error:

Error: Contains more than the maximum number
of prefixes. Maximum is 3

on the following sql statement

SELECT M.email FROM [202.72.165.199].[nrl].[dbo].[tblMembers] M, inserted WHERE M.USERNAME = INSERTED.EMAIL AND M.EXTERNALID <> INSERTED.SUBSCRIBERID

my linked server is the IP address. How do you select columns if you exceed the allowed prefixes? i.e.
select [202.72.165.199].[nrl].[dbo].[tblMembers].Mycolumnname from [202.72.165.199].[nrl].[dbo].[tblMembers]

any help appreciated

matt_calhoon
Posting Yak Master

235 Posts

Posted - 2005-03-01 : 01:58:28
Sorry this statement works but my update doesnt:


UPDATE [202.72.165.199].nrl.dbo.tblMembers
SET
FirstName = INSERTED.GIVENNAME,
Surname = INSERTED.SURNAME,
username = INSERTED.EMAIL,
PASSWORD = INSERTED.PASSWORD
FROM INSERTED
INNER JOIN DELETED ON DELETED.SUBSCRIBERID = INSERTED.SUBSCRIBERID
WHERE [202.72.165.199].nrl.dbo.tblMembers.EXTERNALID = INSERTED.SubscriberID
Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2005-03-01 : 05:09:29
I've not quite woken up yet, but I don't think that you can do the update like that. I think you have to connect to the server you want to do the update on, and link to the source one. (As in, your FROM clause could have the four part name, but not the UPDATE)

-------
Moo. :)
Go to Top of Page
   

- Advertisement -