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

IIF equivalent

Status
Not open for further replies.

LLBP

IS-IT--Management
Jan 31, 2002
39
0
0
US
Is there a way to use IIF or the like to perform aggregate function based on the value of another column?

I use this successfully in Access:
IIF([Department]=80, SUM([Uptime]), MAX([Uptime]))

I get an error about IIF not being recognized when using it in an expression in a view in SQL Server 2000. If I try it in Query Analyzer I get an error about "=" is invalid expression.

Any help is appreciated!

Brent
 
Outstanding! Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top