Choosing the right professional
I’m writing this blog post from my bed, you may think that’s a little too much information there is a...
2012-01-11
481 reads
I’m writing this blog post from my bed, you may think that’s a little too much information there is a...
2012-01-11
481 reads
Blimey, doesn’t seem like a year since I wrote my last end of year review End of year review 2010...
2012-01-01
682 reads
I’d seen various #meme tweets on twitter but it wasn’t until I saw this blog by John Sansom (Blog|Twitter) that...
2011-12-15
475 reads
It’s that time of the month again, no not time, T-SQL time! If you have not heard of T-SQL Tuesday...
2011-12-13
868 reads
It only seems like a couple of weeks ago since I wrote a post about new years resolutions which you...
2011-11-15
521 reads
Sometimes it’s not possible to have the data you need in order to create the most efficient queries possible. This...
2011-11-15
700 reads
Unless you’ve worked in a vacuum the likelyhood is that you either are a third company or you have many...
2011-11-09
491 reads
The UK SQL community has never had so many events in such a short space of time. Last week there...
2011-10-06
421 reads
Feedback from the second leg of SQLRelay was very positive indeed. The attendees from my Maidenhead group were very impressed...
2011-10-05
675 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