Tips for Simplifying Crosstab Query Statements
Rob Gravelle takes a complex SQL statement and shows you several ways to re-write it that both simplifies and shortens it, while still yielding the same results.
2010-02-22
4,532 reads
Rob Gravelle takes a complex SQL statement and shows you several ways to re-write it that both simplifies and shortens it, while still yielding the same results.
2010-02-22
4,532 reads
Cleaning up garbage from data can be a big problem for a developer.Check out a simple solution from Shubhajyoti Ghosh to cleaning up garbage from data.
2010-02-22
10,781 reads
2010-02-12
4,393 reads
2010-02-11
4,213 reads
2010-02-10
3,745 reads
Can you use SQL Server to extrapolate out trends from your data? Lots of companies would have you buy a BI solution instead, but new author Mark Wojciechowicz brings us a great example of how you could forecast something in T-SQL.
2017-05-19 (first published: 2010-02-09)
56,363 reads
2010-02-04
4,598 reads
Transpose N rows of a table (v2.0 allows user to specify the table's schema)
2014-09-10 (first published: 2010-01-29)
2,032 reads
2010-01-29
4,541 reads
2010-01-28
3,952 reads
By HeyMo0sh
Microsoft Fabric (not to be confused with the more general term “fabric” in DevOps)...
By James Serra
I’m honored to be hosting T-SQL Tuesday — edition #192. For those who may...
By Vinay Thakur
Continuing from Day 2 , we learned introduction on Generative AI and Agentic AI,...
I'm fairly certain I know the answer to this from digging into it yesterday,...
Hi Team, I am trying to refresh the Azure Synapse Dedicated pool from production...
hi everyone I am not sure how to write the query that will produce...
I have some data in a table:
CREATE TABLE #test_data
(
id INT PRIMARY KEY,
name VARCHAR(100),
birth_date DATE
);
-- Step 2: Insert rows
INSERT INTO #test_data
VALUES
(1, 'Olivia', '2025-01-05'),
(2, 'Emma', '2025-03-02'),
(3, 'Liam', '2025-11-15'),
(4, 'Noah', '2025-12-22');
If I run this query, how many rows are returned?
SELECT *
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t; See possible answers