SQL Server error code
SQL Server error 8125
SQL Server raises error 8125 at severity 16, which marks a problem with the query or data that you can correct.
An aggregated expression containing an outer reference must be contained in either the select list, or a HAVING clause subquery in the query whose FROM clause contains the table with the column being aggregated.
| Msg | 8125 |
|---|---|
| Severity | 16 |
| Group | 8000–8999 |