SQL Server - Compilation issue - Asked By Mayank Tripathi on 21-Feb-14 09:01 AM

Dear Team,

I am facing one issue Please help me in understanding the issue and the fix.

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'
@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 21-Feb-14 09:32 AM
Post the procedure source code.

You could also try surrounding Amount and Name with brackets just in case they are keywords now.

Mayank Tripathi replied to Robbe Morris on 21-Feb-14 10:18 AM
Tried but no luck... :(
Till yesterday this proc was resulting as expected. But today it started behaving rude.