Are your backup files where they say they are?
I was having a cleanup of some old scripts the other day when I stumbled upon a script I wrote...
2018-08-08 (first published: 2018-07-25)
2,018 reads
I was having a cleanup of some old scripts the other day when I stumbled upon a script I wrote...
2018-08-08 (first published: 2018-07-25)
2,018 reads
I thought I’d give you all a little preview of our latest offering, the Undercover Catalogue which should be available...
2018-08-06
268 reads
A couple of times recently I’ve seen the question asked, ‘How can I select a single row at random from...
2018-07-26 (first published: 2018-07-20)
725 reads
This months T-SQL Tuesday is being hosted by Bert Wagner , you can find the invitation for this months topic here.
Bert...
2018-07-18 (first published: 2018-07-10)
2,709 reads
I’ve been having a little play around with AWS recently and was looking at S3 (AWS’ cloud storage) when I...
2018-06-18
900 reads
Sometimes emails from SQL Server go missing, especially when you share an inbox with colleagues. On most occasions it doesn’t...
2018-06-14 (first published: 2018-06-05)
2,393 reads
Now this is something that I’ve seen asked a few times and it’s always a question that gets a fair...
2018-05-24
2,519 reads
Have you ever had the need to give elevated permissions via a stored procedure above that what the user calling...
2018-05-14 (first published: 2018-05-02)
2,417 reads
This month’s T-SQL Tuesday is brought to you by Jens Bestergaard – the subject is Essential SQL Server tools, the original...
2018-04-10
1,096 reads
We all go to great lengths to make sure that our databases are secure (or at least I really hope...
2018-04-09 (first published: 2018-04-04)
2,475 reads
By Brian Kelley
I will be leading an in-person Certified Information Systems Auditor (CISA) exam prep class...
EightKB is back again for 2026! The biggest online SQL Server internals conference is...
By HeyMo0sh
Working in DevOps long enough teaches you two universal truths: That’s exactly why I...
Hi all, I just started using VS Code to work with DB projects. I...
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
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