Stored Procedure returning duplicate results where as firing the sql it runs directly doesn't?

Different results might be caused by different connection settings (e.g. Ansi_nulls, arith_abort etc. ).

Run sp_recompile on the stored procedure to clear the procedure cache for that stored procedure. To clear the entire procedure cache execute DBCC FREEPROCCACHE Here's an example of recompiling if you want to put it in a re-usable script: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO /****** Object: Maintenance - StoredProcedure Sample. SampleSearch Script Date: 07/28/2011 14:15:15 ******/ IF (EXISTS (SELECT * FROM INFORMATION_SCHEMA.

ROUTINES WHERE ROUTINE_SCHEMA = 'Sample' AND ROUTINE_NAME = 'Sampleearch')) BEGIN PRINT 'Marking procedure Sample. SampleSearch for recompile' EXEC sp_recompile 'Sample. SampleSearch' PRINT 'Finished marking procedure Sample.

SampleSearch for recompile' END GO However, if the query is returning different results, maybe turn on SQL tracing or debug the call from the code to ensure the same in and out parameters are being used in both cases.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions