The most important skill to practice when preparing for any certification exam!
I like practice tests. Once I feel like I’m getting ready to take a certification exam I start taking an...
2013-08-28
1,025 reads
I like practice tests. Once I feel like I’m getting ready to take a certification exam I start taking an...
2013-08-28
1,025 reads
I recently read an awesome post on http://www.stackexchange.com questioning how to change columns to rows ie UNPIVOT. One answer demonstrated...
2013-08-21
1,318 reads
Last week I posted my stored procedure for database permissions, sp_DBPermissions. A couple of days later I was demonstrating it...
2013-08-19
1,422 reads
At first glance these two functions seem very similar, and superficially they are. For example COALESCE(fieldname1, fieldname2) and ISNULL(fieldname1, fieldname2)...
2013-08-16 (first published: 2013-08-07)
8,887 reads
Last week I posted a series of database permissions scripts. I’ve been using them quite a bit over the last...
2013-08-14
1,447 reads
“My transaction log is too big!” I wish I had a dime for each time phrase has been spoke, written,...
2013-08-12
1,662 reads
Over the last year of blogging my thoughts and queries I’ve discovered something interesting. I posted Where is my Backup?...
2013-08-05
1,428 reads
SSIS is one of those tools that I love and hate at the same time. It’s a great ETL tool...
2013-08-05 (first published: 2013-07-31)
2,704 reads
Recently I came across a post on http://www.StackOverflow.com that basically asked how to write a generic stored procedure to handle...
2013-07-31 (first published: 2013-07-22)
3,608 reads
I’ve had to debug database mail problems several times over the last year or so. Below is a collection of...
2013-07-29
1,394 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