Analyzing Tempdb Spills and Usage Across Recursive Queries
This article examines how tempdb is affected by recursive queries, using a few different methods.
2025-05-23
1,903 reads
This article examines how tempdb is affected by recursive queries, using a few different methods.
2025-05-23
1,903 reads
Learn how you can parse a series of parameters that are passed in a string of tuples, meaning pairs, of values and preserve order without using STRING_SPLIT with the ordinal parameter.
2023-10-11
2,088 reads
2023-07-28
606 reads
This article looks at calculating prime numbers less than n with one query.
2023-06-14
7,083 reads
This script converts hierarchical adjacency into nested json rows which contain the recursive "downlines" of each node. The table-valued function treats each row in the original adjacency as the root node in a recursive common table expression.
2019-11-25 (first published: 2019-11-24)
763 reads
This script converts hierarchical adjacency into nested json rows which contain the recursive "downlines" of each node. The table-valued function treats each row in the original adjacency as the root node in a recursive common table expression.
2019-11-12 (first published: 2019-11-08)
2,051 reads
2018-11-19
3,130 reads
Learn how to generate lists of column values from multiple rows by grouping and using a recursive CTE. This is a very flexible and easy implementation, compared to using cursors or PIVOT operators.
2015-06-26 (first published: 2013-07-09)
31,130 reads
By Steve Jones
This value is something that I still hear today: our best work is done...
By gbargsley
Have you ever received the dreaded error from SQL Server that the TempDB log...
By Chris Yates
Artificial intelligence is no longer a distant concept. It is here, embedded in the...
Hi everyone I am writing an SP where there is logic inside the SP...
Comments posted to this topic are about the item Planning for tomorrow, today -...
We have a BI-application that connects to input tables on a SQL Server 2022...
I try to run this code on SQL Server 2022. All the objects exist in the database.
CREATE OR ALTER VIEW OrderShipping AS SELECT cl.CityNameID, cl.CityName, o.OrderID, o.Customer, o.OrderDate, o.CustomerID, o.cityId FROM dbo.CityList AS cl INNER JOIN dbo.[Order] AS o ON o.cityId = cl.CityNameID GO CREATE OR ALTER FUNCTION GetShipCityForOrder ( @OrderID INT ) RETURNS VARCHAR(50) WITH SCHEMABINDING AS BEGIN DECLARE @city VARCHAR(50); SELECT @city = os.CityName FROM dbo.OrderShipping AS os WHERE os.OrderID = @OrderID; RETURN @city; END; goWhat is the result? See possible answers