SQL ServerPedia – Blog Awards
I have been catching up on some blog posts and I read a few posts by well known bloggers like...
2010-11-04
596 reads
I have been catching up on some blog posts and I read a few posts by well known bloggers like...
2010-11-04
596 reads
I got asked a question today that I though was quite interesting. If my backup starts at 6pm and it...
2010-11-04
684 reads
WOW this is the 12th TSQL2Sday albeit this month’s is week early because of the PASS summit next week, so...
2010-11-02
629 reads
Some friends of mine decided to support the Movember charity this year. I would try and explain what Movember is...
2010-11-01
713 reads
In order to be able to execute bulk operations you need to certain level of privilege both on the database...
2010-10-28
32,803 reads
About two weeks ago my good friend and former colleague Justin Hostettler-Davie -JHD (Blog | Twitter) asked me via my wife...
2010-10-18
777 reads
A SQL Server database can be in one of three recovery models. FULL, BULK_LOGGED and SIMPLE. The recovery model you...
2010-10-12
1,945 reads
I haven’t written a post for a TSQL Tuesday for a little while and I know that I’m late getting...
2010-10-12
1,070 reads
I have posted a short note on instant file initialization previously, that post can be found here. The crux of...
2010-09-21
1,728 reads
I posted recently about my run-in with autoclose and my online friend Jorge Segarra (Blog|@SQLCHICKEN) left a great comment on...
2010-09-15
1,619 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