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