Sync SSMS Tools Pack Across Computers Using SyncToy
My favorite and most used feature of the SSMS Tools Pack is the query history. This feature has saved me a lot of time and effort. DBAs where I...
2011-10-06
23 reads
My favorite and most used feature of the SSMS Tools Pack is the query history. This feature has saved me a lot of time and effort. DBAs where I...
2011-10-06
23 reads
My favorite and most used feature of the SSMS Tools Pack is the query history. This feature has saved me a lot of time and effort. DBAs where I...
2011-10-06
12 reads
As a follow-up to my SERVERPROPERTY() post, this is a quick script to grab all the SESSIONPROPERTY() values from your...
2011-08-23
853 reads
As a follow-up to my SERVERPROPERTY() post, this is a quick script to grab all the SESSIONPROPERTY() values from your current session in a table. Useful when you forget...
2011-08-23
16 reads
Demo files from my presentation at Dallas Tech Fest 2011.
SQL Server CLR – An Introduction – Dallas Tech Fest 2011
2011-08-12
721 reads
In a continuation of my previous LOGON TRIGGER post.
A downside to SQL logins is that anyone with the username / password...
2011-06-18
2,135 reads
Yesterday I was trying to drop some hypothetical indexes in production against a fairly active table. I started causing blocking...
2011-05-12
7,515 reads
I had a need today to disable all of our admin jobs while I moved our admin database to another...
2011-04-25
2,833 reads
A quick script to grab all the SERVERPROPERTY() values from a SQL instance in a table. Useful when you forget...
2011-04-14
13,313 reads
Yesterday, I was tasked with helping a team move their BizTalk databases to another server. These are my notes for...
2011-04-08
1,435 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