How to read documentation
I was thinking about a comment I made to my intern last week. She has been studiously attending to all the different things I do in my day (what...
2019-10-02
21 reads
I was thinking about a comment I made to my intern last week. She has been studiously attending to all the different things I do in my day (what...
2019-10-02
21 reads
In my final post about gatekeeping in technology, I have to come clean about something. Let’s go through this journey together. In the first post we spoke about what...
2019-09-25
16 reads
In my home lab I have an Ubuntu virtual machine that runs both SQL Server 2017 and SQL Server 2019 in Docker containers. After SQL Server 2019 Release Candidate...
2019-09-18
72 reads
Recently I have become more vocal on Twitter and on my personal blog about my social activism. For the record, I have been an activist for LGBTQIA+ rights since...
2019-09-11
116 reads
In a previous post I wrote about storing password hashes in a database, which raises the question of how to convert an existing legacy password storage system to use hashes (or...
2019-09-04
30 reads
As regular readers of this blog will know, I’m a big fan of AzCopy, especially now that it has a sync option to keep local data synchronized with blob...
2019-08-28
1,592 reads
An exciting new feature in SQL Server 2019 is Accelerated Database Recovery (ADR). Resulting from a combination of magic beans and smart software developers (I might be wrong about...
2019-08-21
45 reads
Recently I wrote: Don’t store passwords in a database. I stand by this statement. I expected a lot of flak because I didn’t explain myself. This post goes into...
2019-08-14
297 reads
This is the second in a series of posts about gatekeeping in Information Technology and other fields. Negative terminology The language we use matters. In the first post I...
2019-08-07
16 reads
Hello, and welcome to today’s class on storing passwords in a database. Don’t store passwords in a database. Thanks for attending. Photo by James Sutton on Unsplash.
The post How...
2019-07-31
256 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