开发者

Problem with select statement via a linked server

I am using MS SQL Server 2000 and have a link from a test db to a live db which is in replication. The link seems to work fine and I can select from any of the tables using any of the fields apart from the field with the constraints on creating ids. So if I run select * from person where firstname like 'john' this works fine, but then if I run select * from person where id =1 then I get no data returned and I get no errors but t开发者_JAVA百科he record exists.

Any advise is much appreciated.

Thanks


If select * from person where id =1 returns no rows then the record doesn't exist.


It's been a few years since I've worked with linked servers, but have you tried running profiler against the linked server (the live DB) to see that it's receiving the select statement and that it's receiving it correctly?


Can you see the record in enterprise manager through the dblink, or are you looking at the linked db directly?

Maybe your link is not pointing where you think it is.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜