How Many Good Hours Do Employees Work?
You might call me a bean counter, but it's a fact that every manager needs to manage the distractions that...
2007-09-11
513 reads
You might call me a bean counter, but it's a fact that every manager needs to manage the distractions that...
2007-09-11
513 reads
Makes me yearn for a faster connection, about a 2300 mb download to get all the various pieces and if...
2007-09-10
1,249 reads
For those who might not have browsed previous posts I'm heading up a free one day training event called SQLSaturday...
2007-09-10
543 reads
I wrote this up based on some questions in our recent BI class where we spend almost a full day...
2007-09-06
528 reads
You might have visited these already, but it's interesting to see MS diversify a bit from the standard MSDN template....
2007-09-06
960 reads
It's taken a while to get here, but we're finally accepting registrations for the event. This link will take you...
2007-08-31
1,340 reads
Steve posted an interesting editorial on blogs at http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=263&messageid=393904 and the follow up discussion was pretty interesting. Read that if...
2007-08-30
1,524 reads
I previously blogged about using newid() to get random ordering and after chatting with Steve about it, decided to write...
2007-08-30
1,344 reads
I attended for the morning and Brian attended in the afternoon and did a session as well. It was interesting...
2007-08-27
1,321 reads
Our one day free SQL Server event is slowly gaining momentum! Draft schedule is at http://www.sqlsaturday.com/schedule.aspx. 30 sessions total and...
2007-08-27
1,572 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