Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query on new field

Status
Not open for further replies.

simma

Programmer
Sep 11, 2001
398
US
Hello
How do I query on new field we create in query.
something like
select a.a1,a.a2,(a.a3+a.a4)as 'newfield'
where newfield ='10'
Thanks
 
Try something like this:

select a.a1,a.a2,(a.a3+a.a4)as 'newfield'
where ( (a.a3+a.a4) =10)

-VJ




 
or
select * from
(select a.a1,a.a2,(a.a3+a.a4)as newfield) a
where newfield =10


======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Thanks nigelrivett,Thats what I want..
Thanks Amorous,I wanted to avoid reusing the formula in where statement
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top