Data Warehousing Explained
Why Warehouse
Data warehousing is the act of transforming application database into a format more suited for reporting and offloading it...
2017-05-14
275 reads
Why Warehouse
Data warehousing is the act of transforming application database into a format more suited for reporting and offloading it...
2017-05-14
275 reads
Note : Since publishing this I’ve been notified that there are a number of outstanding issues with the SQL Server merge...
2017-05-08
58 reads
Often when trying to pivot data you wont know what the possible values that you need to pivot on, in...
2017-05-07
62 reads
The new JSON bits in SQL Server 2016 give you the ability to pull stuff out of JSON and to...
2017-05-06
94 reads
I’m going to walk through an example that we can build up and improve with a number of the new...
2017-05-05
35 reads
The Pivot and Unpivot features in SQL Server are I find quite underused. For a long time I got by...
2017-05-04
52 reads
CROSS APPLY was introducted as part of TSQL in SQL Server 2005. Origionally it was created as a way to...
2017-05-03
43 reads
SSL All the Things
Browsers are starting to highlight sites without SSL as insecure in a bid to push everyone to...
2017-04-26
132 reads
Brief Description
Temporal tables allow automated change tracking of a table directly in to a history table which can be queried...
2016-04-15
77 reads
.Net CLI is the new tooling that sits in front of .Net Core, allowing you to create and run projects...
2016-02-07
40 reads
By Brian Kelley
I will be leading an in-person Certified Information Systems Auditor (CISA) exam prep class...
EightKB is back again for 2026! The biggest online SQL Server internals conference is...
By HeyMo0sh
Working in DevOps long enough teaches you two universal truths: That’s exactly why I...
Hi all, I just started using VS Code to work with DB projects. I...
Comments posted to this topic are about the item Fun with JSON II
Comments posted to this topic are about the item Changing Data Types
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 t1.[key] AS row,
t2.*
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t1
CROSS APPLY OPENJSON(t1.value) t2; See possible answers