T-SQL Tuesday Live–7 Apr 2020
Last week went a little crazy, and I learned something: don’t post a Zoom link on Twitter. My apologies to anyone that wanted to join and had things go...
2020-04-06
12 reads
Last week went a little crazy, and I learned something: don’t post a Zoom link on Twitter. My apologies to anyone that wanted to join and had things go...
2020-04-06
12 reads
I’ve started to add a daily coping tip to the SQLServerCentral newsletter, which is helping me deal with the issues in the world. I’m adding my responses for each...
2020-04-03
25 reads
2020-04-03
509 reads
I presented a session today at Redgate Streamed and did a number of demos. The code consists of a few flies, which I’ve made available here: BasicUnitTesttsqlt.zip. This consists...
2020-04-02
20 reads
I’ve started to add a daily coping tip to the SQLServerCentral newsletter, which is helping me deal with the issues in the world. I’m adding my responses for each...
2020-04-02
20 reads
2020-04-02
452 reads
It’s not from SQLServerCentral, though I hope to do more training across the next few months. Andy Leonard is offering Free Training for People Who Have Lost Their Jobs....
2020-04-02
54 reads
DotNet developers, if you’re using the System.Data.SqlClient, stop. Move over to Microsoft.Data.SqlClient now. It’s easy to do, well, it’s relatively easy to say that. The actual work isn’t that...
2020-04-02 (first published: 2020-03-26)
1,266 reads
Steve wonders today about the need to compete in our jobs, especially with employers that view us as resources.
2020-04-02
130 reads
Imagine how coding might take place if cursors were as efficient as complex SELECT statements.
2020-04-01
363 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