Actuate SQL grammar
The Actuate SQL grammar contains one statement. The syntax of this statement is:
[<Pragma>] […n] [<QueryParameterDeclaration>] <SelectStatement>
Report designers also use a FILTERS statement that incorporates Actuate SQL. Information Object Designer does not support use of the FILTERS statement. The syntax for the FILTERS statement is:
<FilterClause> <QueryParameterDeclaration> <SelectStatement>
Table 7-3 provides the syntax for the grammar parts used in these statements.
<MultiplicativeExpression> {(+ | - | ||) <MultiplicativeExpression>} […n]
Use AdHocParameter only in a FILTERS statement, which is available only from a report designer. AdHocParameter cannot be used in a WITH clause.
COUNT (([ALL | DISTINCT] <ValueExpression> | *))
| (AVG | MAX | MIN | SUM) ([ALL | DISTINCT]
<ValueExpression>)
CASE [<ValueExpression>]
{<WhenClause>} […n]
[ELSE <ValueExpression>]
END
FILTERS(IDENTIFIER DataType 'ValueExpression' [,…n])
If the identifier is not enclosed in quotes, it is interpreted as a table. If the identifier is enclosed in quotes, it is interpreted as an absolute or relative path in the Encyclopedia volume.
IDENTIFIER ( ([<ExpressionList>]) | [. IDENTIFIER] )
ValueExpression can be an expression as long as the expression also appears as a SELECT item.
: IDENTIFIER
ValueExpression is not limited to SELECT items or aliases. If ValueExpression is not a SELECT item or an alias, it must be a grouping column if a GroupByClause is present.
Use ORDER BY only when creating a query in a report designer. Do not use ORDER BY when you create an information object in Information Object Designer.
IDENTIFIER [<AS>] <Data Type>
PRAGMA IDENTIFIER := CHAR_LITERAL
<FunctionCallOrColumnRef>
| <ParamPlaceholder>
| <UnsignedLiteral>
| <AggrExpression>
| (<ValueExpression>)
| <CastExpression>
VARCHAR [(<Length>)]
| DECIMAL [(<Precision>, <Scale>)]
| INTEGER
| DOUBLE [<Precision>]
| TIMESTAMP
(
 (
 SELECT [ALL | DISTINCT] <SelectList>
 <FromClause>
 [<WhereClause>]
 [<GroupByClause>]
 [<HavingClause>]
 [<SetClause>]
 )
|
 (<SelectWithoutOrder>)
)
[<SetClause>]
UNION ALL
(<SelectWithoutOrder> | <SelectWithoutFrom> )
CHAR_LITERAL
|[+ | -]INTEGER_LITERAL
|[+ | -]DOUBLE_LITERAL
|[+ | -]DECIMAL_LITERAL
|TIMESTAMP TIMESTAMP_STRING
  | IS [NOT] NULL
  | [NOT]
  (
  BETWEEN <ValueExpression> AND <ValueExpression>
  | LIKE <ValueExpression> [ESCAPE <ValueExpression>]
  | IN <SubQuery>
  | IN (ExpressionList)
  )
 )
The escape character must evaluate to a single character other than a single quote, a percent sign, or an underscore.
CHAR_LITERAL
|INTEGER_LITERAL
|DOUBLE_LITERAL
|DECIMAL_LITERAL
|TIMESTAMP TIMESTAMP_STRING

Additional Links:

Copyright Actuate Corporation 2012