ascot diagnostics

A6071

Error: Wrong number of arguments: ‘{name}’ takes {takes}; the statement fails when it runs

A built-in SQL function is called with a number of arguments it does not take, such as ROUND with one argument or CONCAT with three. IRIS compiles the class or routine, and the statement gets SQLCODE -1 when it runs. Pass as many arguments as the function takes.

IRIS compiles the example.

Class Demo.SqlArgumentCount
{

ClassMethod Rounded() As %Numeric
{
    &sql(SELECT ROUND(3.14159) INTO :rounded) //! A6071
    Quit rounded
}

}

All diagnostics