Without seeking promises or guarantees, what are the chances of being able to use a parameter directly in ORDER BY in some future version of SQL Server?
Is it impossible due to the architecture of SQL Server?
Or is it possible but in the too hard basket?
DECLARE @SortExpression nvarchar(50) SET @SortExpression = 'ColumnZ' SELECT * FROM TableName ORDER BY @SortExpression