Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How to use column alias

Author  Topic 

isomodjvarac
Starting Member

3 Posts

Posted - 2001-06-18 : 06:39:12

Sopouse I have a query like this:

SELECT (some_complex_expression) AS x1, (another_complex_expression) AS x2
FROM some_table

I would like to add a column to this query which will calculate x1-x2 but,

SELECT (some_complex_expression) AS x1, (another_complex_expression) AS x2, x1-x2
FROM some_table

refuse to work. In MS Acces this works very well but I do not know how to pull it in MS SQL Server.



Ivan The Terrible
   

- Advertisement -