ascot diagnostics

A5086

Error: Label ‘{label}’ is not listed among the applicable tables; the statement gets SQLCODE -23 when it runs

The label in label.column or label.* is neither a table of the statement nor an alias of one. A table given an alias goes by the alias alone. IRIS compiles the class or routine, and the statement gets SQLCODE -23 when it runs. In a cursor’s SELECT, the class fails to compile instead. Qualify the column with the alias, or with the table’s name when it has none.

IRIS compiles the example.

Class Demo.SqlPerson Extends %Persistent
{

Property Name As %String;

}
Class Demo.SqlLabelNotFound
{

ClassMethod Named() As %String
{
    &sql(SELECT p.Name INTO :name FROM Demo.SqlPerson person) //! A5086
    Quit name
}

}

All diagnostics