The order by-clause is used to sort the result. It has the following syntax:

CopyC#
<orderByClause> ::=
  Order By <expression> [ Asc | Desc ] [, <expression> [ Asc | Desc ] ]
expression
Expression that defines the sort order. See TCQL Expression Language for details.
Anmerkung
Keywords in TCQL are case sensitive. Therefore you have to write From, you cannot write from. Additionally identifiers have to start with a capital letter. Therefore you cannot write From p In Project.... Instead you have to write From P In Project... . This behavior may change in future versions of time cockpit so that TCQL may be case insensitive in the future.

Dieses Thema enthält die folgenden Abschnitte.

Beispiele

The following example shows a simple order by-clause:

Copy 
From P In Project
Order By P.ProjectUuid
Select P

The following example shows a order by-clause with nested sort criteria:

Copy 
From P In Project.Include('CustomerRelation')
Order By P.ProjectName, P.CustomerRelation.CustomerName Asc
Select New With
{
        P.ProjectName,
        P.CustomerRelation.CustomerName
}

Siehe auch