Sorting the Sql table using alias column
In older versions of SQL Server, you can define the alias in a subquery:
select *
from (
select col1 + col2 as col3
from YourTable
) SubQueryAlias
order by
col3
In SQL Server 2008+ you should be able to order by
an alias without a subquery:
select col1 + col2 as col3
from YourTable
order by
col3
one more option you can use COLUMN INDEX NUMBER in order by as show in follwoing example
select ACol,AVal,CAST(ACol as varchar(3)) + aval as 'New' from ABC order by 3
this will use 'New' columnd to sort