Searching SQL Servers & Saving Results, with Write-SqlTableData
The other day I was chatting with my friend Tom Roush ( B | T ) and he mentioned needing to scan every database on every SQL Server instance...
2016-10-14
59 reads
The other day I was chatting with my friend Tom Roush ( B | T ) and he mentioned needing to scan every database on every SQL Server instance...
2016-10-14
59 reads
Learn how to use the login commands included with SSMS2016 from PowerShell.
2016-09-01
3,412 reads
That’s right, PowerShell & Power BI.
How does this work you ask?
Well back in July, Rob Sewell ( b | t ) gave us...
2016-08-12
237 reads
That’s right, PowerShell & Power BI. How does this work you ask? Well back in July, Rob Sewell ( b | t ) gave us a preview of this,...
2016-08-12
6 reads
A number of new SQL Server PowerShell cmdlets have been released and the Microsoft is asking for feedback on what else you'd like to see.
2016-07-01
1,213 reads
Next week Chrissy LeMaire ( b | t ), Laerte Junior ( b | t ), Rob Sewell ( b | t ) and I will be hosting a...
2016-06-30
550 reads
Next week Chrissy LeMaire ( b | t ), Laerte Junior ( b | t ), Rob Sewell ( b | t ) and I will be hosting a...
2016-06-30
5 reads
TL;DR: Go Vote / File on Connect NOW! For years I’ve avoided Connect, it’s true. In an ironic twist fit for a recursive-CTE I think I quit using Connect...
2016-05-07
7 reads
TL;DR: Go Vote / File on Connect NOW!
For years I’ve avoided Connect, it’s true.
In an ironic twist fit for a recursive-CTE...
2016-05-07
266 reads
Ken Van Hyning is the Engineering Manager for the SQL Server tools, including SQLPS.
2016-04-19
1,656 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...
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
Comments posted to this topic are about the item Answering Questions On Dropped Columns
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