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 2005 Forums
 Transact-SQL (2005)
 Linked server problem

Author  Topic 

icw
Constraint Violating Yak Guru

378 Posts

Posted - 2010-07-13 : 03:19:14
select * from [win2003\win2003sql2k].northwind.dbo.customers
where customerid
not in (select Customerid from WIN2003.Test123.dbo.customers.Customers)

gives me the following error (see below)
I know I am supposed to use an alias but i can't figure out how to do it .
====================================
Msg 117, Level 15, State 1, Line 3
The object name 'WIN2003.Test123.dbo.customers.Customers' contains more than the maximum number of prefixes. The maximum is 3.

Kristen
Test

22859 Posts

Posted - 2010-07-13 : 03:25:17
If "WIN2003" is a linked server name, containing the database "Test123" then you need

not in (select Customerid from WIN2003.Test123.dbo.customers.Customers)

That's the error message you are getting - but your Subject suggests you'#ve got a general problem with making a Linked Server?

is [win2003\win2003sql2k] defined as a linked server too?
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-07-13 : 03:27:52
There is a 'Customers' too much.
Server: WIN2003
DB: Test123
Schema: dbo
Table: customers
and then the additional Customers is wrong.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-07-13 : 03:28:28



No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

icw
Constraint Violating Yak Guru

378 Posts

Posted - 2010-07-13 : 07:02:55
Of course there is.
I've been working too hard - i didn't even see it

thanks
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-07-13 : 07:10:12
I know that feeling


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -