2026-05-06
670 reads
2026-05-06
670 reads
Learn how table valued parameter joins in SQL Server stored procedures can negatively impact query performance.
2026-05-06
Many organizations store cash-flow data inside SQL Server and decision-makers often need metrics like Net Present Value (NPV) and Internal Rate of Return (IRR) to evaluate those cash flows. Is it possible to calculate NPV and IIR values in SQL Server without the use of external tools?
2026-05-01
A short introduction to how deadlocks work and how you can affect their behavior inside your system.
2026-07-13 (first published: 2026-05-01)
3,293 reads
Introduction SQL Server includes several built-in mathematical functions that allow developers to perform complex calculations directly within queries. Among these are trigonometric functions such as SIN(), COS(), and TAN(), which are useful in scenarios involving engineering calculations, geographic data processing, simulations, and analytics. Although these functions are straightforward to use, developers occasionally encounter unexpected results […]
2026-04-29
2,567 reads
Learn how the JSON_ARRAYAGG() function works in SQL Server 2025.
2026-04-27
4,463 reads
2026-05-18 (first published: 2026-04-27)
663 reads
2026-04-23 (first published: 2026-04-22)
552 reads
The magic way to get better performance from your system is to write better code from the start.
2026-04-22
201 reads
2026-04-17
835 reads
By Steve Jones
I was experimenting with CHOOSE() recently after I was asked a question. In a...
By DesertDBA
I did not expect 27 responses to my T-SQL Tuesday #204 invitation, but it...
Should you adopt an off-the-shelf AI tool, partner with a specialist, build in-house, or...
Has anyone ever seen this before? I have sysadmin permission on a server. I...
Comments posted to this topic are about the item Switching Schema II
Comments posted to this topic are about the item A Practical Approach to Automating...
I run this query:
SELECT s.name AS schemaname , o.name AS objectname FROM sys.objects o INNER JOIN sys.schemas s ON s.schema_id = o.schema_id WHERE o.name = 'Beer'I get two rows back for the objects, named dbo.beer and etl.beer. Both the tables have identical schemas and are not partitioned. There are 25 rows in dbo.beer and 0 rows in etl.beer. I run this code:
ALTER TABLE dbo.beer switch TO etl.beerWhat happens? See possible answers