T-SQL Tuesday #101: My Essential SQL Server Tools
This T-SQL Tuesday is brought to us by Jens Vestergaard (b | t), and we are asked to share our favorite...
2018-04-10
666 reads
This T-SQL Tuesday is brought to us by Jens Vestergaard (b | t), and we are asked to share our favorite...
2018-04-10
666 reads
This T-SQL Tuesday is brought to us by Jens Vestergaard (b | t), and we are asked to share our favorite...
2018-04-10
70 reads
Problem
For good database design, it is not idea to have everything in your PRIMARY filegroup so you can do partial...
2018-04-03
288 reads
Problem
For good database design, it is not idea to have everything in your PRIMARY filegroup so you can do partial...
2018-04-03
53 reads
Chicago O’Hare AirportI had two SQL Saturdays this month SQLSaturday Chicago and SQLSaturday Rochester both of which were very cold....
2018-04-01
265 reads
Problem
I’ve noticed on demo machines that sometimes Telegraf doesn’t start on the first try, and this seems to not happen...
2018-03-12
1,019 reads
I had two SQL Saturdays this month SQLSaturday Cleveland (which was very cold) and SQLSaturday Tampa (which had very nice...
2018-03-01
200 reads
Problem
We need a way to collect performance metrics for all our SQL Servers (Windows and Linux) into one system and...
2018-02-24
4,783 reads
This month Aaron Bertrand (b | t) has given us a Dealer’s Choice on the T-SQL Tuesday topic. I’m of course going...
2018-02-13
129 reads
We Speak Linux
I am super excited to be to have launched this website. We Speak Linux is a place for...
2018-02-07
110 reads
By HeyMo0sh
Working in DevOps long enough teaches you two universal truths: That’s exactly why I...
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...
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