The perils of RAID
Recently, I was asked to assist an organization with getting their data back for a SQL Server that had experienced...
2017-10-18
622 reads
Recently, I was asked to assist an organization with getting their data back for a SQL Server that had experienced...
2017-10-18
622 reads
In the #sqlhelp Slack channel on the SQL Server Community Slack workspace last month, Jemma Hooper asked: When trying to...
2017-10-11
458 reads
For a few years now, Microsoft has augmented its irregular release of Service Packs with a more frequent Cumulative Update...
2017-10-04
444 reads
October is a busy month for me. I am flying all over the US and Canada for speaking engagements to...
2017-09-27
545 reads
I’ve been working with SQL Server for many years now, and up until recently, I assumed that rebuilding any clustered...
2017-09-20
433 reads
Joe Obbish wrote an epic post a few weeks ago about loading a trillion rows into a non-partitioned table in...
2017-09-13
443 reads
I got a strange request in a Slack channel the other day. A colleague in South Africa, who uses Windows,...
2017-09-06
389 reads
Last week, I posted this statement on Twitter, along with a screen capture of the official Microsoft documentation: Reminder: Max...
2017-08-30
343 reads
This coming weekend, at SQLSaturday #635 in Vancouver BC, I will be presenting a brand new talk about Temporal Tables,...
2017-08-23
123 reads
For the longest time, MySQL has been the recommended database platform for blogs and other websites. It’s free. It’s available...
2017-08-16
152 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