ascot diagnostics

A4912

Error: %SAMPLE_PERCENT takes a number greater than 0 and at most 1, not {value}

The number after %SAMPLE_PERCENT, in TUNE TABLE or COLLECT STATISTICS, is outside its range. IRIS reads it as the share of rows to sample, greater than 0 and at most 1, so 0.5 samples half the rows. Otherwise IRIS refuses to compile the class (SQLCODE -1, Percentage range (0 to 1] expected). Write the share as a fraction, 0.5 for 50 percent.

IRIS rejects the example.

Class Demo.SqlPercentRange
{

ClassMethod Tune()
{
    &sql(TUNE TABLE Demo.Person %SAMPLE_PERCENT 50) //! A4912
}

}

All diagnostics