Advent of Code – Day 4
Day 4 of the Advent of Code has us mining for data in MD5 hashes, which is out of the comfort zone for a SQL DBA to say the...
2015-12-24
3 reads
Day 4 of the Advent of Code has us mining for data in MD5 hashes, which is out of the comfort zone for a SQL DBA to say the...
2015-12-24
3 reads
If you want your skills to be sharp, you practice. If you want to get yourself to actually do practice, you call it a “challenge”. This is what the...
2015-12-23
14 reads
We’ve been using the wrong data types for all the wrong reasons. DBAs, developers, data architects, etc. have all been...
2015-12-21
985 reads
A Clustered Index is not another term for Primary Key, and more thought should be put into the key columns...
2015-12-16 (first published: 2015-12-14)
2,543 reads
Data compression is often misunderstood to cost CPU in exchange for smaller size on disk. Somewhat true, but that simple...
2015-12-08
1,131 reads
I love working with indexes, and I need to know what’s using them to work on them intelligently. Most of...
2015-12-08 (first published: 2015-12-01)
2,013 reads
Reading the SQL Server Error Log is miserable. It contains very useful information you should address as soon as possible,...
2015-11-16
688 reads
I write on my blog and get a couple comments at best. I talk at conferences and a large part of...
2015-11-06 (first published: 2015-11-02)
646 reads
Extended Events is supposed to be taking over for most of Profiler and server-side tracing functionality, but there were people...
2015-10-26
1,537 reads
There’s a trick to technical interviews. Every question is looking for integrity first, and intelligence and energy second. This is...
2014-05-23 (first published: 2014-05-13)
2,774 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