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 |
|
filipecorreia
Starting Member
3 Posts |
Posted - 2004-04-22 : 07:59:11
|
| Can anyone help me with this simple queryselect (5 + 6) as b, (b + 6) as c;how can I build a column with the AS function and the use that column in the same query.thank you |
|
|
samsekar
Constraint Violating Yak Guru
437 Posts |
Posted - 2004-04-22 : 08:08:00
|
You cant do like that... Select b, (b + 6) as c from (select (5 + 6) as b) as T- Sekar |
 |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2004-04-22 : 08:14:53
|
| or just select (5 + 6) as b, ((5 + 6) + 6) as c; |
 |
|
|
drymchaser
Aged Yak Warrior
552 Posts |
Posted - 2004-04-22 : 08:47:15
|
| declare @b intselect @b = (5+6)select @b as b, (@b + 6) as c; |
 |
|
|
|
|
|