Seaquel
SQL Server error code

SQL Server error 9987

SQL Server raises error 9987 at severity 15, which marks a problem with the query or data that you can correct.

The max gap argument in NEAR clause must be either the word MAX or an integer greater than or equal to 0.
Msg9987
Severity15
Group9000–9999

Source: Database Engine events and errors