I am using following query to do this
select (Col_A + Col_B) Foo,
(Col_C + Col_D) Bar,
(Col_A + Col_B + Col_C + Col_D) FooBar from Table1
But is there a way like to do like this
select (Col_A + Col_B) Foo,
(Col_C + Col_D) Bar,
(Foo + Bar) FooBar from Table1
it gives Error
'Invalid Column Foo'
'Invalid Column Bar'
How to solve this?
Order bystatement msdn.microsoft.com/en-us/library/ms189499.aspx