Home All Groups Group Topic Archive Search About
Author
9 Dec 2004 10:21 AM
Vincent Choy
Can anybody know how to set alias after 'where'?
select 1 as A, 2 as B,A-B as C from tbl where [B]=1

Author
9 Dec 2004 12:35 PM
Miha Markic [MVP C#]
Hi Vincent,

I don't think that this is commonly supported, actually it depends on the
database.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
SLODUG - Slovene Developer Users Group
www.rthand.com

Show quote
"Vincent Choy" <vinc***@exodus-tech.com> wrote in message
news:O2R3kjd3EHA.3472@TK2MSFTNGP09.phx.gbl...
> Can anybody know how to set alias after 'where'?
> select 1 as A, 2 as B,A-B as C from tbl where [B]=1
>
>
Author
9 Dec 2004 2:27 PM
Earl
Play with that as a subquery, something like this:

Select
(Select X.1) as A,
(Select X.2) as B,
(Select X.A - X.B) as C

FROM tbl as X
WHERE X.2 = 1


Show quote
"Vincent Choy" <vinc***@exodus-tech.com> wrote in message
news:O2R3kjd3EHA.3472@TK2MSFTNGP09.phx.gbl...
> Can anybody know how to set alias after 'where'?
> select 1 as A, 2 as B,A-B as C from tbl where [B]=1
>
>

AddThis Social Bookmark Button