I am trying to pull user data from 2 tables, one locally and one on a linked server, but I am getting the wrong results when querying a remote server.
I reduced my request to
select * from SQL2.USER.dbo.people where persId = 475785
for testing and found that when I run it, I do not get any results, although I know that a person exists. (persId is an integer, db is SQL Server 2000 and dbo.people is a table, by the way)
If I copy / paste the request and run it on the same server as the database, it works.
This seems to only affect certain user IDs, e.g.
select * from SQL2.USER.dbo.people where persId = 475784
works great for the user until the one I want.
Strange I found that
select * from SQL2.USER.dbo.people where persId like '475785'
also works but
select * from SQL2.USER.dbo.people where persId > 475784
returns records with persIds starting from 22519, and not 475785, as I expected.
Hope this made sense to someone
Any ideas?
UPDATE: Due to internal problems related to making any changes to the table of live people, I temporarily moved my database so that they were on the same server, so the problem of a linked server does not apply. When the entire batch will be transferred to a separate cluster, I can correctly research. I will update the update as soon as this happens and I can work through all the suggestions. Thank you for your help.