How to Calculate Distance Between Coordinates in SQL Server
Learn a quick way to calculate distances without resorting to spatial calculations.
2026-05-08
2,412 reads
Learn a quick way to calculate distances without resorting to spatial calculations.
2026-05-08
2,412 reads
Learn how to split strings efficiently in T-SQL using STRING_SPLIT and the REGEXP_SPLIT_TO_TABLE function in SQL Server 2025.
2026-05-08
2026-05-06 (first published: 2025-04-16)
1,745 reads
Learn how table valued parameter joins in SQL Server stored procedures can negatively impact query performance.
2026-05-06
You may have spotted we currently have some issues with spambots affecting our chat forums. We're working through this at speed to get the issues resolved and the offending posts removed. Please bear with us while we fix this, and please don't log into any spam post and attempt to view or download attached files.
2026-05-05
102 reads
Learn about the latest version of SQL Server and get help installing it on your system.
2026-05-04
8,325 reads
In my previous article, I discussed how to prepare for Microsoft certification exams. In this article, I’m covering what you should do when actually taking the exams.
2026-05-04
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
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,469 reads
The short answer: in the real world, only the first column works. When SQL Server needs data about the second column, it builds its own stats on that column instead (assuming they don’t already exist), and uses those two statistics together – but they’re not really correlated.
2026-04-29
When I put together the invitation for T-SQL Tuesday #202, I wasn't sure what...
By Steve Jones
My life has some crazy travel stretches for sure. Between speaking, office visits, customer...
In Part 1, we saw how ‘Vamana’ represents vectors as nodes, connects them with...
Comments posted to this topic are about the item Server-Level Table sizes
Comments posted to this topic are about the item Optional Parameter Plan Optimization in...
There is a table tmp_tab:
CREATE TABLE tmp_tab ( id int, val int );
INSERT INTO tmp_tab VALUES (1, 1), (2, NULL), (3, 3), (4, 4), (5, 5);You want to order the rows ids by the following expression:
ISNULL(val, id) + 1Which of the following queries produces the expected ordering and why? (Select all correct) See possible answers