ATN2 uses two components to calculate an angle while retaining its quadrant. I keep the argument order and angle unit visible. Dividing one component by the other would lose useful information and introduce a zero-denominator case.
QUOTENAME Object Names: Quote Each SQL Server Name Part
QUOTENAME object names separately to keep each part of a qualified SQL Server name intact. The function surrounds its entire input with identifier delimiters. A dot inside that input stays inside one quoted name. I keep the schema and object in separate variables.
geometry STOverlaps: Intersection Alone Is Not Enough
geometry STOverlaps asks a narrower question than whether two shapes share any points. I test equal and contained regions alongside a partial overlap. Those intersecting cases do not all satisfy the method’s overlap definition.
STRING_SPLIT and Its Ordinal Column
STRING_SPLIT and its ordinal column preserve token positions when you request the third argument and sort by ordinal in SQL Server.
smalldatetime: Minute Rounding Can Change the Day
smalldatetime does more than hide seconds. These explicit conversions show minute rounding and a midnight carry, with complete original timestamps retained.
ISO Week Numbers: Find the Matching ISO Week Year
ISO week numbers can belong to a different year from the calendar date. A Thursday-based calculation keeps the ISO year and week together across December and January.
SQL SERVER – Get Date of All Weekdays or Weekends of the Year
Tejas Shah’s easy script to list the date of all weekdays or weekends of a year with a recursive CTE, first written to find every Sunday of 2010.







