T-SQL Tuesday #158–Implementing Worst Practices
Not that I’m looking to do this, but that’s the invitation from Raul Gonzalez this month. This is the monthly blog party where we write on a topic chosen...
2023-01-10
135 reads
Not that I’m looking to do this, but that’s the invitation from Raul Gonzalez this month. This is the monthly blog party where we write on a topic chosen...
2023-01-10
135 reads
Today’s coping tip is to look back at a previous coping tip that required planning and evaluate how it helped. One of my tips in December was to listen...
2023-01-09
18 reads
SouthWest Airlines had some issues, possibly because of their technical debt and lack of investment.
2023-01-09
194 reads
2023-01-09
473 reads
Today’s coping tip is to do something outdoors today. Enjoy nature. I’m writing this a few days ahead, so I’m using an activity I did over the weekend. The...
2023-01-06
10 reads
This is the goal setting post for 2023. The previous ones were: 2022 2021 2020 2019 2018 As with previous years, I’ll break these into three categories: career, personal,...
2023-01-06
19 reads
Last year I set a bunch of goals, and I thought I did pretty good working on them. Not amazing, but pretty good. This year, I want to attack...
2023-01-06
17 reads
We got a solar system in 2022 to try and fix some of our power costs and hedge against the future. We were fairly confident it would work well,...
2023-01-06 (first published: 2022-12-28)
254 reads
2023-01-06
156 reads
2023-01-06
438 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