2019-02-27 (first published: 2019-02-20)
949 reads
2019-02-27 (first published: 2019-02-20)
949 reads
Can be useful when inserting a lot of data into a table.
2019-02-26 (first published: 2019-02-14)
5,340 reads
This script features as we can through the CTE Top10FilesWithLargerDiskConsumption the top ten data files that are showing greater consumption of hard drive related data-reading activities.
2019-01-15 (first published: 2019-01-08)
1,064 reads
Collect CPU % for a time period and alert if Average CPU usage is high
2019-01-14 (first published: 2019-01-08)
1,779 reads
Quick check SQL connection and process details with current SQL text
2018-12-19 (first published: 2018-11-27)
980 reads
2018-11-30 (first published: 2017-04-01)
1,110 reads
2018-11-29 (first published: 2018-11-23)
454 reads
2018-11-15 (first published: 2018-11-08)
1,590 reads
If you have a SQL Server with a High Availability solution (AlwaysOn Availability Groups, Database Mirroring, etc.), and you also have a bunch of jobs which you need to be run on the Primary server only. You need to be able to "failover" the jobs in case the Primary server is no longer Primary.
2018-11-14 (first published: 2018-11-12)
6,000 reads
Create the code to detect and repair non trusted foreign keys
2018-11-13 (first published: 2018-09-27)
708 reads
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...
By Steve Jones
Recently I ran across some code that used a lot of QUOTENAME() calls. A...
Comments posted to this topic are about the item The New Software Team
Comments posted to this topic are about the item Database Mail in SQL Server...
Comments posted to this topic are about the item The string_agg function
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