sp_RestoreScript 1.8 Now Released
It looks like there was a bug lurking in sp_RestoreScript that was causing the wrong ALTER DATABASE command to be generated when using @SingleUser and a WITH MOVE parameter....
2020-11-23
50 reads
It looks like there was a bug lurking in sp_RestoreScript that was causing the wrong ALTER DATABASE command to be generated when using @SingleUser and a WITH MOVE parameter....
2020-11-23
50 reads
Welcome along to the first module in our Undercover Academy’s SQL Server Backup and Recovery course. In this module we’re going to look at how to take and restore...
2020-10-07 (first published: 2020-09-30)
339 reads
sp_RestoreScript 1.7 has been released. For information and documentation please visit https://sqlundercover.com/2017/06/29/undercover-toolbox-sp_restorescript-a-painless-way-to-generate-sql-server-database-restore-scripts/ Changes in 1.7 New Parameters @IncludeCopyOnly – 1 – Copy only backups are included0 – Copy only...
2020-09-29
184 reads
The merry-go-round scan or advanced scan is something that I’ve seen mentioned a few times recently and it’s a lovely little feature of Enterprise Edition that not all that...
2020-09-23 (first published: 2020-09-16)
232 reads
This is just going to be a quick post but I was asked the question the other day, how can I find all the tables in the database that...
2020-08-20
820 reads
SQL Server has given us the option to backup our databases directly to Azure BLOB storage for a while now but it’s not something that I’ve had all that...
2020-07-08 (first published: 2020-06-22)
512 reads
This month’s T-SQL Tuesday invitation is from Ken Fisher and he’s asking about non-SQL tips and tricks. This had me thinking for a bit and then something popped into...
2020-06-23 (first published: 2020-06-09)
349 reads
BlitzFileStats is the latest addition to our custom module collection for reporting on data logged to tables using the First Responder kit, We created a new project where we plan on...
2020-06-03
26 reads
Undercover Catalogue Update 0.4.3 An update to the tables module, Row count and size infotmation added Fix – LocalInterrogation There was an issue with the LocalInterrogation stored proc not...
2020-06-01
23 reads
As always, the script from this post can also be found on our GitHub repo, HERE You’ve got a SQL Server with a few hundred databases on it (to...
2020-04-23 (first published: 2020-04-15)
732 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