I hate sp_estimate_data_compression_savings

December 17, 2019 Andy 0

If you’re working with compressed indexes, SQL Server provides a system stored procedure to help test the space savings of implementing data compression: sp_estimate_data_compression_savings. Starting in SQL Server 2019, it can even be used to estimate savings with columnstore. I really don’t like sp_estimate_data_compression_savings. In … [Read More]

INSERT EXEC statement cannot be nested

December 13, 2019 Andy 0

Question I have a stored proc spGetSites that returns three columns for SiteName, SiteId and UnitCount. The stored proc runs perfectly fine. I’m trying to store the results of the stored proc to a temp table @Site to use for my report with below syntax. … [Read More]

How to create date buckets in T-SQL

October 28, 2019 Andy 0

I was fiddling around with some data, looking at making a quick aging report. I probably should have reached for Power BI Desktop, but sometimes I can be stubborn, and I wanted to get my T-SQL to work–if nothing else to figure out how to … [Read More]