Sergey,
Like I said, I stumbled across it, I never knew it was possible before, and had written quite a few dynamic SQL queries before that now do not need to be dynamic.
>I'm not sure what is so special about it? SQL Server allows expressions in ORDER BY clause.
>
>>I just stumbled across this little gem