HAVING

<having_clause> ::= HAVING <expression>

The HAVING clause is used to specify a boolean condition that must be satisfied by a group for the group record to be output. Groups that do not satisfy the condition are discarded.


Examples:

A. Simple expression

HAVING EventID = 501

B. Complex expression

HAVING SUM(sc-bytes) > 100000 AND
	 ( COUNT(*) > 1000 OR
		 EXTRACT_EXTENSION(cs-uri-stem) LIKE 'htm'
	 )

C. Complex expression

The following example query retrieves all the event sources from the System event log that generated more than 10 events:
SELECT SourceName
FROM System
GROUP BY SourceName
HAVING COUNT(*) > 10

See also:

Expressions
WHERE

Filtering Groups


© 2004 Microsoft Corporation. All rights reserved.

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@systemmanager.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.