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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

criteria referring to calculated field in same query 1

Status
Not open for further replies.

simon551

IS-IT--Management
May 4, 2005
249
Hey all,
Is it possible to set a criteria based on a calculated field in the same query. Referring to the calc field's name?

 
you can't refer to the name, but you can reuse the actual calculation:

Won't work:

Select Id, Sum(ID) As SumOfID
From SomeTableName
ORDER BY SumOfID

Will work:

Select Id, Sum(ID) As SumOfID
From SomeTableName
ORDER BY Sum(ID)


Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual
 
Thank you. I appreciate it.

-simon
 
no problem, thanks for the star, hope you got it working!

les
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top