SQL Server error code
SQL Server error 1015
SQL Server raises error 1015 at severity 15, which marks a problem with the query or data that you can correct.
An aggregate cannot appear in an ON clause unless it is in a subquery contained in a HAVING clause or select list, and the column being aggregated is an outer reference.
| Msg | 1015 |
|---|---|
| Severity | 15 |
| Group | 1000–1999 |