SQLCruise: The Trident
Move over Poseidon. I’m hitting the sea with my own trident (assuming I can get it through the TSA). My...
2012-01-26
828 reads
Move over Poseidon. I’m hitting the sea with my own trident (assuming I can get it through the TSA). My...
2012-01-26
828 reads
The PASS Performance Virtual chapter is getting a reboot. We all know that responsibilities and schedules change, and that meant...
2012-01-24
739 reads
PBM raises errors for policy violations. We can create alerts on those errors to be notified of policy violations. In...
2011-12-07
1,642 reads
The Professional Association for SQL Server and the North Texas SQL Server User Group have been working hard behind the...
2011-11-30
1,485 reads
We will walk through creating a policy to evaluate the status of “Auto Create Statistics” on our server named “File2”. ...
2011-11-21
1,393 reads
Let’s take a look at how to import the Microsoft Best Practice Policies into your Policy Based Management Server. You...
2011-10-25
1,018 reads
If you need to setup a Central Management Server or just want to check it out, then here is how...
2011-08-09
967 reads
I recently had the need to move the MSDTC for a cluster to a new SAN drive. It’s a quite simple...
2011-07-28
2,856 reads
I recently had the need to move the quorum for a cluster to a new SAN drive. It’s a quite simple...
2011-07-25
2,487 reads
Note that TempDB is recreated every time SQL starts. Why is this important? It means we don’t have to move the...
2011-07-14
747 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