Query to Email….Well Formatted Email
When I get alerts from SQL Server I want it to do three things for me. Tell me what’s wrong, show me the data, then tell me how to...
2025-04-10
126 reads
When I get alerts from SQL Server I want it to do three things for me. Tell me what’s wrong, show me the data, then tell me how to...
2025-04-10
126 reads
One of my servers wasn’t rebooted when it should have been and I never realized it until after the outage...
2016-06-01
518 reads
One of my servers wasn’t rebooted when it should have been and I never realized it until after the outage was over. The big deal wasn’t that it didn’t...
2016-06-01
54 reads
I hinted at file growths in my previous posts about shrinking data and log files. Then I talked about growing...
2016-04-11 (first published: 2016-03-29)
1,876 reads
I hinted at file growths in my previous posts about shrinking data and log files. Then I talked about growing log files in my post Database Log VLFs. However,...
2016-03-29
22 reads
How fast are your databases growing? Should I panic about a 1 TB database that has 100 GB free on...
2016-03-21
649 reads
How fast are your databases growing? Should I panic about a 1 TB database that has 100 GB free on disk? Am I safe with a 100 GB database...
2016-03-21
18 reads
Recompiles can be a hidden bottleneck on your server, and it may not be too obvious. I should know, it...
2016-03-17 (first published: 2016-03-07)
1,640 reads
You can run queries against multiple servers at once, and it’s quite useful for a number of reasons. I use...
2016-03-14
714 reads
Setting up registered servers and practical uses of multiserver queries in SSMS.
2016-03-14
19 reads
By HeyMo0sh
One of the biggest challenges I’ve faced in cloud operations is maintaining clear visibility...
By Steve Jones
I come to Heathrow often. Today is likely somewhere close to 60 trips to...
By Brian Kelley
If your organization is spending money, then meaningful results are a must. Pen testing...
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