Get All Database Snapshots and Their Parent Databases On A SQL Server
This is going to be a quick post but this morning I was asked the question, ‘how can I get the name of all the database snapshots on a...
2019-08-15
173 reads
This is going to be a quick post but this morning I was asked the question, ‘how can I get the name of all the database snapshots on a...
2019-08-15
173 reads
We’ve released sp_RestoreScript 1.5. This is only a minor release but adds the type of the backup file to the output. You can grab the latest version from our...
2019-08-12
16 reads
Intent locks, one of those things in SQL Server that seem to be very often misunderstood. They’re something that I’ve found myself explaining time and time again, I’ve even...
2019-07-25
659 reads
I recently hit this rather interesting issue when migrating a bunch of SQL Servers onto a nice, shiny new SAN. The plan was simple enough, take the secondary servers...
2019-07-22 (first published: 2019-07-08)
2,769 reads
We love xp_fixeddrives here, it’s a quick and simple way to see how much space you’ve got available on your drives. But there are just a couple of things...
2019-07-17 (first published: 2019-07-03)
826 reads
sp_RestoreScript 1.4 is now out and ready for download from our GitHub, https://github.com/SQLUndercover/UndercoverToolbox/blob/master/sp_restorescript.sql New Features Compatible with case sensitive collations Now accepts wild cards in the @DatabaseName string, (‘Database1,Database2,SQL%’)...
2019-07-15
222 reads
Undercover Catalogue 0.2.2 It looks like a bug has crept it’s way into the Undercover Catalogue. When running with certain versions of DBA Tools, a number of the modules...
2019-06-20
17 reads
Here’s a little error that I stumbled across the other day when trying to migrate the data files of an Availability Group secondary node onto a nice new SAN....
2019-06-06
153 reads
The SQL Installation script can be found here The Inspector sample report has been updated here All of the below Git Issues can be found on the V1.4 Project...
2019-05-20
24 reads
You know what it’s like, you need to fail your AG over but is it safe to fail over? Perhaps you’ve clicked on ‘failover’ for the AG and there’s...
2019-05-09 (first published: 2019-04-29)
855 reads
By Steve Jones
Redgate is a for-profit company. We look to make money by building and selling...
If you've ever loaded a 2 GB CSV into pandas just to run a...
By James Serra
What problem is Fabric Ontology trying to solve? For years, most data conversations have...
Tlp/Wa_Cs:0817-866-887 Jl. Brigjen Sudiarto No.294, Palebon, Kec. Pedurungan, Kota Semarang, Jawa Tengah 50273
Tlp/Wa_Cs:0817-866-887 Jl. Majapahit No.112, Pandean Lamper, Kec. Gayamsari, Kota Semarang, Jawa Tengah 50161
Tlp/Wa_Cs:0817-866-887 Jl. Jenderal Ahmad Yani No.24-26, Panderejo, Kec. Banyuwangi, Kabupaten Banyuwangi, Jawa Timur 68416
We create the following table and then insert some records in it:
create table t1 ( id int primary key, category char(1) not null, product varchar(50) ); insert into t1 values (1, 'A', 'Product 1'), (2, 'A', 'Product 2'), (3, 'A', 'Product 3'), (4, 'B', 'Product 4'), (5, 'B', 'Product 5');What happens if we execute the following query in both Sql Server and PostgreSQL?
select id,
category,
string_agg(product, ';')
over (partition by category order by id
rows between unbounded preceding and unbounded following) as stragg
from t1; See possible answers