Restrictions

Expressions in this grammar are subject to these restrictions:

  • Superfluous parentheses are not allowed.

    For example, this produces a parsing error:

    (V(this)=1 and 2=V(that)) and 1=(2)

    Instead, you can write this expression to work around the grammar limitation:

    V(this)=1 and 2=V(that) and 1=2
  • Operation chains that contains a mix of typed and typeless arguments must begin with a typed value.

    For example, this example produces an error because the first argument of the right-hand expression, V(a), is not a typed value:

    '12'=V(a)+'B'+V(c)

    Instead, and because string concatenation is not commutative, you can write this expression as:

    '12'=''+V(a)+'B'+V(c)

    Alternatively, you can declare the type for the first argument as:

    '12'=CAST(V(a) AS STRING)+'B'+V(c)

    Again, this example produces an error because the first argument of the right-hand expression, V(b), is not a typed value:

    12>V(b)+1+5

    Instead, you can write the expression in one of these ways:

    12>0+V(b)+1+5
    12>CAST(V(b) AS NUMBER)+1+5
    12>1+V(b)+5

    The last solution works because numeric addition is commutative.

  • Functions cannot be used for variable, parameter, or constant names.

    For example, because the letter y is an abbreviation for year in the DATEPART( ) and DATEDIFF( ) event functions, this expression produces an error:

    SETVARVALUES(y = 5)

    Instead, you can declare y as yVar. This expression does not produce an error:

    SETVARVALUES(yVar = 5)