2013-05-08
1,349 reads
2013-05-08
1,349 reads
Did you know that the GO command isn’t really part of T-SQL? It’s what’s called a batch separator. And in...
2013-05-06
911 reads
So I am now an MCITP Database Developer for SQL 2008. This is a big milestone for me. A few...
2013-05-01
805 reads
I spend a reasonable amount of time looking through various forums, answering some questions and reading the answers to others....
2013-04-29
2,581 reads
I’ve occasionally had the problem of trying to put “smart” logging messages into a process. You know the ones, you’re...
2013-04-24
749 reads
I’ve been thinking recently about who writes the best documentation. Not including a professional technical writer (although they actually do...
2013-04-22
811 reads
This one is basic but still something that can catch you unawares if you aren’t careful. Most DBAs and developers...
2013-04-15
1,232 reads
I generally spend part of each day looking through http://www.stackoverflow.com, http://dba.stackexchange.com or http://www.sqlservercentral.com. I read through questions that have already...
2013-04-12 (first published: 2013-04-01)
4,182 reads
I see this question in one form or another a lot. I’ve seen this or something like it probably half...
2013-04-08
765 reads
This is an uncommon task but one that does turn up every once in awhile. A SQL login has to...
2013-04-03 (first published: 2013-03-25)
9,498 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