Script SQL Server Agent Jobs Using PowerShell
It’s that time of the month again, no not that one, it’s T-SQL Tuesday time and this weeks topic is...
2012-02-29
4,743 reads
It’s that time of the month again, no not that one, it’s T-SQL Tuesday time and this weeks topic is...
2012-02-29
4,743 reads
Writing a CV that rocks is not an art. It just requires some planning and an understanding of what you...
2012-02-24 (first published: 2012-02-21)
3,606 reads
Knowing precisely how to start on your next adventure is tricky. With so many options and decisions in front of...
2012-02-17 (first published: 2012-02-13)
2,325 reads
It’s late, really late and you’ve got a mountain of work to get through to meet the deadline. To add...
2012-02-06
979 reads
Knowing precisely how to start on your next adventure is tricky. With so many options and decisions in front of...
2012-02-01
1,067 reads
Knowing precisely how to start on your next adventure is tricky. With so many options and decisions in front of...
2012-01-31
2,138 reads
Many of you have first hand experience of our phenomenal sql community (affectionately labelled the #sqlfamily).
Your first encounter with it...
2012-01-09
600 reads
The first week following on from the Christmas break is a very hectic one for us Data Professionals.
Your customers are...
2012-01-03
622 reads
That’s easy, because Brent Ozar (Blog|Twitter) challenged me to……
Finding time to keep up with awesome blog content can be tough....
2011-12-15
653 reads
Volume 1 was packed full of knowledge and a very welcome edition to my bookshelf! With the bar already set...
2011-12-09
840 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