Error 8117 appears when you SUM a BIT column, because bit is invalid for sum operator. I reproduce it with a small table and show a simple workaround.
SQL SERVER – Beginning of SQL Server Security
The beginning of SQL Server security: how authentication, logins, users and permissions work together to keep your data safe from misuse.
What Distributed SQL Means and What It Costs
Understand distributed SQL through data placement, compute and storage roles, write coordination, and the latency and operating costs behind scale.
Upcoming Birthdays in the Next 30 Days With T-SQL
Find upcoming birthdays with T-SQL across year boundaries, choose a February 29 policy, and build a clear next-30-days list.
PARSENAME for Dotted Values: Build Numbers and Object Names
Why does revision 12 sort before 7? Because the parts are text. Here is how PARSENAME fixes it, and where it trips you up.
SQL SERVER – Difference Between ORIGINAL_LOGIN() and SUSER_SNAME()
What is the difference between ORIGINAL_LOGIN() and SUSER_SNAME()? A quick script with context switching shows when the two return different logins.







