| Author |
Topic  |
|
|
ronin2307
Posting Yak Master
126 Posts |
Posted - 10/02/2006 : 16:26:32
|
if I have something like this
select x.a,x.b,(x.c+x.d+x.e) as result, result-x.a from table
that 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.a from table
thanx |
|
|
tkizer
Almighty SQL Goddess
USA
35017 Posts |
Posted - 10/02/2006 : 16:31:57
|
select result, result - a from (select x.a,x.b,(x.c+x.d+x.e) as result, x.a from table) t
Tara Kizer |
 |
|
|
ronin2307
Posting Yak Master
126 Posts |
Posted - 10/02/2006 : 16:42:24
|
| many thanx |
 |
|
| |
Topic  |
|
|
|