ascot diagnostics

A7693

Error: ‘{name}’ has a syntax of its own, which this call does not follow; the statement fails when it runs

A function with a syntax of its own, such as CAST(value AS type), TRIM(chars FROM value) or POSITION(a IN b), is called with a plain argument list. IRIS compiles the class, and the statement gets SQLCODE -1 when it runs (AS expected for the example). Write the call in the function’s own syntax, as in CAST('7' AS INTEGER).

IRIS compiles the example.

Class Demo.SqlFunctionSyntax
{

ClassMethod Number() As %Integer
{
    &sql(SELECT CAST('7', 1) INTO :number) //! A7693
    Quit number
}

}

All diagnostics