The curse of the blank page
Last week I wrote about recovering data after an unplanned outage, and this week I’m contemplating a thing that would be considered bad in those circumstances as well as...
2021-06-02
13 reads
Last week I wrote about recovering data after an unplanned outage, and this week I’m contemplating a thing that would be considered bad in those circumstances as well as...
2021-06-02
13 reads
A few years ago, I wrote that a CPU is “a hot mess of on-off switches.” There’s more to it than that when you get into the weeds of...
2021-05-31 (first published: 2021-05-19)
432 reads
One of my special interests as an autistic person is understanding mechanical components of a computer, both analog and digital. In the olden days, we had devices known as...
2021-05-26
26 reads
In February 2011, Pat Wright invited us to talk about Automation: So the topic I have chosen for this month is Automation! It can be Automation with T-SQL or...
2021-05-12
12 reads
At the end of 2010, Sean McCown (blog | Twitter) invited us to talk about resolutions: Things like getting certified, or perfecting a process, or taking management classes, etc...
2021-05-05
14 reads
There comes a time when we heed a certain call. The call is to avoid dangerous undocumented DBCC commands in SQL Server, especially those that bypass built-in protections. I’m...
2021-04-28
16 reads
Next week on Wednesday is the Calgary Data User Group’s second event for 2021, and the second event as a member of Microsoft’s new Azure Data Community. Since last...
2021-04-21
17 reads
(Thanks to Erik Darling for reviewing this post. Check out his training materials.) One of the bigger clichés in the data professional vocabulary (behind “it depends”) is that you...
2021-04-20 (first published: 2021-02-17)
544 reads
Click here to read previous retrospective entries. From Steve Jones (blog | Twitter) in December 2010 comes the question “What issues have you had in interacting with the business to get your...
2021-04-15 (first published: 2021-04-14)
175 reads
The last time I presented a session was at the final PASS Summit in November 2020, so it is time to get back on the virtual conference trail again....
2021-04-07
12 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