View Single Post

   
  #2 (permalink)  
Old 02-29-2008, 01:56 PM
Erland Sommarskog
 
Posts: n/a
Default Re: There is a question when i work on Linkedserver~Pls kindly help me:)

xchong.zhou@gmail.com (xchong.zhou@gmail.com) writes:
> I have a question when I work on Linkedserver
>
> The Linkedserver name is [Hp-server],the Datebase name is
> Newexec,the Table name is Customers_CoypTest
>
> The SQLScript is below:
>
> Update [Hp-server].Newexec.dbo.Customers_CoypTest
> set Unitname=b.Unitname
> from [Hp-server].Newexec.dbo.Customers_CoypTest a join
> Newexec.dbo.Customers_CoypTest b
> on a.Cid=b.Cid and b.Cid='Tony'
>
> The server returns ERROR like this:
>
> a) can not open this table '"Newexec"."dbo"."Customers_CoypTest"'
> (come from OLE DB provide server 'SQLOLEDB'). provide server do not
> support index scan on the data source.


Interesting error. :-)

Which version of SQL Server do you have, including service pack (on
both sides)? Also, since the MDAC be involved, which OS versions do
you have?

Also try this syntax:

Update [Hp-server].Newexec.dbo.Customers_CoypTest
set Unitname= (SELECT b.Unitname
FROM Newexec.dbo.Customers_CoypTest b
WHERE a.Cid=b.Cid and b.Cid='Tony')
from [Hp-server].Newexec.dbo.Customers_CoypTest a join

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Reply With Quote