ABS can overflow even when the negative input fits its signed integer type. I widen the input before asking for its magnitude. Casting the output afterward would be too late to protect the calculation.
Protecting an Instance You Cannot Patch Any More
Protect an Instance You Cannot Patch with isolation, least privilege, disabled features, tested backups, and a firm retirement date.
Hierarchyid Subtree: Move With GetReparentedValue
Move a hierarchyid subtree while keeping stable node identifiers. Check the whole branch, repeated requests, missing endpoints and cyclic destinations.
SQL SERVER – EXCEPT Clause in SQL Server is Similar to MINUS Clause in Oracle
Is there a MINUS clause in SQL Server like in Oracle? Yes, EXCEPT returns the rows of the first query that are not in the second. Example included.
SQL SERVER – Query to Find Column From All Tables of Database
How many AdventureWorks tables have an EmployeeID column? My query on sys.tables and sys.columns finds any column from all tables, with schema names.
SQL SERVER – 2005 – Get Field Name and Type of Database Table
How do you get the field name and type of a table in SQL Server 2005? Imran Mohammed answers with sp_help and an INFORMATION_SCHEMA.COLUMNS query.
Who Changed a Server Setting in SQL Server? How to Find Out
Who changed a server setting in SQL Server? The error log records what changed and when, and the default trace adds the login, the computer and the program. Tested with one harmless change that is put back at the end.
SQL SERVER – 2005 – Difference Between INTERSECT and INNER JOIN – INTERSECT vs. INNER JOIN
What is the difference between INTERSECT and INNER JOIN? Both can return common rows, and AdventureWorks examples show how the two compare.
SQL SERVER – Effect of Order of Join In Query
Does the order of join in a query change the result? With AdventureWorks, I show two queries that return the same rows, only in a different order.










