Experts Perspective Webcast: Wait Watchers – Gain Performance Increases Fast
Following in the footsteps of such greats community leaders as Brent Ozar and Kevin Kline I have the opportunity, nay...
2014-08-12
605 reads
Following in the footsteps of such greats community leaders as Brent Ozar and Kevin Kline I have the opportunity, nay...
2014-08-12
605 reads
It’s always an honour to be able to speak at an event, but events can be expensive to attend and...
2014-06-24
687 reads
Scared? Don’t worry, there is a workaround and a hotfix. More on that in a moment.
This morning I checked my...
2014-06-12 (first published: 2014-06-10)
2,742 reads
System databases are often neglected, part of this is due to Microsoft’s message of SQL Server will run and look...
2014-06-12
1,099 reads
If you look online you can find thousands of pages of advice on interviews as well as people asking for...
2014-05-22
886 reads
April was quite a busy month and so apart from the last reflections post and TSQL Tuesday entry Why So Serious...
2014-05-09
679 reads
This month’s T-SQL Tuesday which is now at a staggering number 53, can it really have been going that long?...
2014-04-08
828 reads
After a bit of an enforced sabbatical from blogging (short but boring story), I was interested to see how my...
2014-04-04
664 reads
There are lots of Dynamic Management Objects (DMO’s, more commonly referred to generically as DMV’s) that require extra permissions. Without...
2014-04-02 (first published: 2014-03-25)
93,816 reads
The driver behind the move
After over two and a half years at my current employers I am afraid to say...
2014-04-01
614 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