Functions and clauses

TOP N function

See Using the TOP N function.

COUNT function

Retrieve the number of distinct values of a property.

Example

SELECT COUNT(SI_ID) FROM CI_INFOOBJECTS

Remarks

Use the SI_AGGREGATE_COUNT Property to determine the number of distinct values of a property that were retrieved by the Count function.

It is recommended that you do not mix aggregate and non-aggregate functions in a query statement; for example, do not use the TOP N function together with the COUNT function.

You cannot use SchedulingInfo and ProcessingInfo properties with the Count function. For example, the following SQL-like statements will not work:

ORDER BYclause

You can use an ORDER BY clause to sort the results of a search. This clause consists of one or more properties. The sequence of the properties defines the organization of the result set.

Example

SELECT SI_ID, SI_NAME FROM CI_INFOOBJECTS ORDER BY SI_ID, SI_NAME

You can order your results in either ascending (ASC) or descending (DESC) order. If an order is not specified, ASC is the default.

Example

SELECT SI_ID, SI_NAME FROM CI_INFOOBJECTS ORDER BY SI_ID, SI_NAME DESC



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com