Your current table is tiny, but the AS OF question hides in the history table. See the reads before and after a key-first index, and what it costs.
Currency Rates by Effective Date: Designing the Lookup Table
Why did last quarter’s invoices change overnight? Probably because the rate table had no dates. Here is a lookup that remembers.
Building Full Folder Paths From a Parent-Child Table
Your folder table stores only a name and a parent, so the full path has to be walked. I show the query, and how to catch the rows it quietly leaves out.
PowerShell – Reading Tables Data Using Script
Read-SqlTableData is a PowerShell cmdlet for reading tables data from SQL Server without writing a query. Here is how I tried it on my box.
Changing a User-Defined Table Type That Procedures Use
You need one more column in a table type, but procedures depend on it. Here is the order of moves that works, with the errors along the way.
Counting Partitions per Table and Spotting Empty Ones
A quick count said 8 partitions, but the table has 4. Here is where the extra rows came from and how to spot empty partitions.
SQL SERVER – How to Add Multiple New Columns to Table with Default Values?
A reader asked how to add several columns with default values to an existing table. Here is a simple example to add multiple new columns with defaults.







