Same query,same database,diffrent server,diffrent result

Hello every one
Lately i ran into a problem that really frustrated me.
We have a server that th main database is on it.the problem is that there is this script that when i run it against my database it returns false results ,when i take a back up of this database and restore it on another server it gives me the correct result.you see the database is the same .the script is the same but it doesnt work on my main server. What can i do?