This is a strange one. I have a stored procedure that determines a count of the number of records that meet certain criteria. If I call the stored procedure in a Query Analyzer window by using "exec sp_[procedurename]" I get a count of 1. If I copy the SQL from the stored procedure, paste it into the Query Analyzer window and run it, I get a count of 0. The 0 value is correct.

There is no rounding involved in the query. In a general sense, can anyone explain why the same exact query on the same database would return two different results?