Creating a SQL Server Test Lab On Your Workstation – Part One, Installing The Domain Controller
One of the most useful tools to the DBA when we need to test new features, recreate a fault that...
2017-12-18
634 reads
One of the most useful tools to the DBA when we need to test new features, recreate a fault that...
2017-12-18
634 reads
The slides and demo scripts from today’s GroupBy session are now available on our GitHub repository
https://github.com/SQLUndercover/UndercoverToolbox/tree/master/GroupBy
Many thanks again for watching,...
2017-12-08
349 reads
Now I’m all for making my life easier and one thing that makes life easier for me is having a...
2017-11-27
527 reads
Ladies and Gentlemen, welcome to the main event of the evening. The SQL Undercover Smackdown Heavy Weight Championship of the...
2017-11-16
2,482 reads
So this month’s T-SQL Tuesday subject is a shout out and high-five to those people who have inspired or made a...
2017-11-14
313 reads
This months TSQL Tuesday subject is a shout out and high-five to those people who have inspired or made a contribution...
2017-11-14
703 reads
Hi Folks,
I’m the new guy that my two colleagues are still trying to convince to write my first blog post...
2017-11-14
453 reads
Recently I’ve been thinking about Python and whether it can be useful to the DBA as well as the data...
2017-10-30
392 reads
SQL Server tracks untrusted Foreign keys in sys.Foreign keys with a column called is_not_trusted, there may be a number of...
2017-10-24
192 reads
SQL Server’s integration of Python has been heavily marketed towards the machine learning and BI guys, but does it offer...
2017-10-18
1,146 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