Physical Fitness
Real life events continue to interfere with my regular posting. However, I would rather deal with them and neglect posting...
2007-11-19
1,569 reads
Real life events continue to interfere with my regular posting. However, I would rather deal with them and neglect posting...
2007-11-19
1,569 reads
I'll post Part III of Becoming a DBA tomorrow (meaning there will be two posts). Veterans' Day is typically celebrated...
2007-11-12
618 reads
Work responsibilities took up my time on Thursday and Friday, so I never got around to posting. Here's the resources...
2007-11-11
621 reads
Apex SQL has announced a new version of Apex SQL Log as well as an API for it.
Release Notes...
2007-11-07
790 reads
Building upon my post from last Tuesday, if you know all the roles for a given user, you'll probably want...
2007-11-06
609 reads
I try my best to get things right the first time. So often, correcting a mistake or bad choice is...
2007-11-05
674 reads
This is a follow-up to part I from last week. You've considered what you want to do, you've looked at...
2007-11-05
912 reads
I've used Safari (the O'Reilly version) for a number of years now and it is a resource I often recommend...
2007-11-02
861 reads
As of SQL Server 2005, any database in 90 compatibility mode (settable by sp_dbcmptlevel) cannot support non-ANSI OUTER JOINs. Sometimes...
2007-11-01
2,172 reads
Some time ago I was looking for a password vault and came across some recommendations for KeePass. KeePass is open...
2007-10-31
2,598 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