#PowershellBasics: Expanding the column width to avoid truncation
I was recently asked to get a list of all of the services running on one of the boxes we ... Continue reading
2022-07-20 (first published: 2022-07-07)
444 reads
I was recently asked to get a list of all of the services running on one of the boxes we ... Continue reading
2022-07-20 (first published: 2022-07-07)
444 reads
When I’m sharing code one of the things I hate most is having a scroll bar along the bottom. I ... Continue reading
2022-07-19
109 reads
Last week I posted about a request to get a list of services. The first problem I ran into was ... Continue reading
2022-07-14
233 reads
TLDR; The code to do this is below but it’s a bit hokey and probably isn’t worth it. It’s pretty ... Continue reading
2022-07-11 (first published: 2022-06-24)
523 reads
Resumes have been on my mind a lot recently. I’ve been thinking that I wish I’d kept mine up to ... Continue reading
2022-07-06 (first published: 2022-07-05)
34 reads
Well, it’s only been about a week and a half but here’s an update. First a piece of advice. You ... Continue reading
2022-06-30
98 reads
I love database audits. They are simple, easy to use, effective, not overly resource intensive, and can be turned on ... Continue reading
2022-06-28
33 reads
This months subject for T-SQL Tuesday was Your first technical job. I have to say I really really enjoyed reading ... Continue reading
2022-06-24 (first published: 2022-05-24)
250 reads
As I’m sure a fair number of you already know I was told my position had been eliminated. They are ... Continue reading
2022-06-21
342 reads
I little while back I presented at Pass Data Community Summit. Specifically the presentation was Auditing your data and data ... Continue reading
2022-06-15 (first published: 2022-05-31)
232 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