A quick note on CROSS APPLY: think of it as an inner join to a table valued function that takes parameters, something a regular JOIN cannot do.
geometry STEnvelope: A Bounding Box Includes Extra Space
geometry STEnvelope can include points outside the original shape. These two triangle tests keep envelope membership beside exact containment.
Adding a New Year Partition Before the Calendar Rolls Over
Add a new year partition before January data arrives by checking boundaries, preparing NEXT USED, splitting an empty range, and scheduling the work.
GROUPING SETS: Choose Nonhierarchical Subtotals Explicitly
GROUPING SETS lets me choose independent subtotal combinations instead of assuming one hierarchy. I list the groups the report needs explicitly. That can exclude detail rows while retaining summaries across different dimensions.
SQL SERVER – Difference Between Quality Assurance and Quality Control – QA vs QC
A Tea Time chat at our India office turned into a debate on Quality Assurance vs Quality Control. Here is a simple way to tell QA and QC apart.
EXP and LOG: Read Approximate Inverse Calculations
EXP and LOG can undo each other mathematically, but their SQL float calculations remain approximate. Keep a deliberate display scale and test only the permitted logarithm domain.







