PASS Summit 2020 pre-con time
In 2018, I entered Speaker Idol at the PASS Summit, and because I forgot to start my timer I was disqualified for running over the five-minute limit (say “five-minute...
2020-04-29
10 reads
In 2018, I entered Speaker Idol at the PASS Summit, and because I forgot to start my timer I was disqualified for running over the five-minute limit (say “five-minute...
2020-04-29
10 reads
This post dives into how SQL Server stores date and time data types in memory and on disk. But first, a note about endianness: CPUs manufactured by Intel and...
2020-04-22
158 reads
Erik Darling, of Erik Darling Data (blog | Twitter) recently posted a very interesting video (my YouTube playlist is all Erik Darling Data videos and Honest Trailers). In this...
2020-04-15
20 reads
I will be presenting a session to the Adelaide SQL Server User Group on April 15th, 2020, and if you’re awake at that time (it’ll be 9pm on April...
2020-04-08
55 reads
WARNING: This post contains information that can get you fired if you use it without express written permission. In some jurisdictions it might get you jail time as well....
2020-04-01
47 reads
Last year I released sql2xls, a free open-source tool which lets you throw a bunch of scripts into a folder, run them automatically against SQL Server and get the...
2020-03-25
58 reads
With entire countries shutting their borders, and people being forced to stay home and isolate themselves for as long as possible while health departments ramp up to handle this...
2020-03-18
6 reads
I will be presenting a new session, “Database administration through the ages,” at SQL Saturday #950 in Victoria this coming weekend. This is one of my favourite SQL Saturdays...
2020-03-11
9 reads
My co-authors and I recently wrapped up the book SQL Server 2019 Administration Inside Out, which should be hitting the shelves in the next week or two. At the...
2020-03-04
92 reads
The SQLBits conference is taking place in London again this year, between March 31st and April 4th, and I’ll be there. I will not be presenting this year, but...
2020-02-26
10 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