Quiz & answers for my “Auditing your data and data access” session.
I was honored to speak at Pass Summit last week (Thanks again Redgate), and if you’ve ever been to one ... Continue reading
2021-11-24 (first published: 2021-11-16)
235 reads
I was honored to speak at Pass Summit last week (Thanks again Redgate), and if you’ve ever been to one ... Continue reading
2021-11-24 (first published: 2021-11-16)
235 reads
On any instance you have at least 5 system databases. Master, model, msdb, tempdb and one other. First 5 points ... Continue reading
2021-11-15 (first published: 2021-11-02)
378 reads
After my post last week on sorting the list, I now have a list of files, sorted in the right ... Continue reading
2021-11-12 (first published: 2021-11-04)
470 reads
I’d just like to say a quick thank you to Redgate for hosting the Pass Summit, all of the amazing ... Continue reading
2021-11-11
33 reads
Sometimes when you are trying to figure something out you run across something really interesting. In this case I discovered ... Continue reading
2021-11-09
13 reads
Every one and again you will see people asking What skill do you think is the most important for your ... Continue reading
2021-11-05 (first published: 2021-10-28)
522 reads
I’ve got a project I’m working on at the moment and it includes a number of elements from my recent ... Continue reading
2021-11-01 (first published: 2021-10-21)
7,909 reads
In my last post I grabbed a file list but I really need it sorted alphabetically. Now, I’ve been a ... Continue reading
2021-10-26
24 reads
I’m working on a project right now where I want to add the date/time to the end of a filename. ... Continue reading
2021-10-25 (first published: 2021-10-14)
270 reads
I’m a big fan of comments (MSSQL, Powershell), so along those lines here’s an interesting way to comment an IF-THEN-ELSE ... Continue reading
2021-10-19
68 reads
By Steve Jones
Finding duplicates was an interview question for me years ago, and I’ve never forgotten...
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...
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