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.
Author |
Topic |
ronin2307
Posting Yak Master
126 Posts |
Posted - 2006-10-02 : 16:26:32
|
if I have something like thisselect x.a,x.b,(x.c+x.d+x.e) as result, result-x.afrom tablethat won't work, because result is an invalid column name in this case. How can I write this so I don't have to do this:select x.a,x.b,(x.c+x.d+x.e) as result, (x.c+x.d+x.e)-x.afrom tablethanx |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-10-02 : 16:31:57
|
select result, result - afrom (select x.a,x.b,(x.c+x.d+x.e) as result, x.a from table) tTara Kizer |
|
|
ronin2307
Posting Yak Master
126 Posts |
Posted - 2006-10-02 : 16:42:24
|
many thanx |
|
|
|
|
|