SQL Server - unexpected behaviour of a proc - Asked By Mayank Tripathi on 26-Feb-14 04:25 AM

Dear Team,

I am facing one issue plz help me in understanding the issue.

Scenario : I have created one proc 1 year ago, and deployed it on QA and Prod env.
This proc is having a parameter by name @Order, this will take the value by which we need to sort the final result set.
It can have following values...
@Order = 'Amount Desc'
or
@Order = 'Name ASC'

Now the issue is on Prod this proc is not sorting the result set, where as it works fine on QA.
I have verified that the proc is not changed since 1 yrs and the code is same in both environment.

Please suggest why this proc is behaving in such a way and who it can be fixed?
Robbe Morris replied to Mayank Tripathi on 26-Feb-14 08:52 AM
Post the code for your stored procedure.