T-SQL Tuesday #050 – Automation
In my developer life, my motto was ‘Automate all the things’ and since transitioning to a DBA role, my motto...
2014-01-14
622 reads
In my developer life, my motto was ‘Automate all the things’ and since transitioning to a DBA role, my motto...
2014-01-14
622 reads
T-SQL Tuesday is a recurring blog party, that is started by Adam Machanic (Blog | @AdamMachanic). Each month a blog will...
2013-11-12
544 reads
Since my presentation at Orlando SQL Saturday seemed to go well (standing room only, all positive feedback) I submitted to...
2013-11-11
516 reads
As a DBA your job is to protect the data, whether that be from corruption, attack, developers or any other...
2013-11-07
530 reads
So it is done, it being my first presentation at a professional event. As you may recall, I recently presented...
2013-09-18
320 reads
I’ve submitted presentations before to CodeCamp and SQL Saturdays before, but have never been selected to present due to terrible...
2013-07-21
288 reads
Watching my career progression over the last year, an outside observer would think that I’m playing career path hop-scotch, or...
2013-06-15
543 reads
Just recently I was part of an online presentation in which the intended audience was unable to install any of...
2013-04-04
231 reads
One method my company deploys our software is in a dedicated hosted environment. In this situation, we partner with a...
2013-03-28
1,168 reads
By HeyMo0sh
Over time, I’ve realised that one of the hardest parts of cloud management isn’t...
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...
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