Trigger Based Change Data capture
This script capture INSERTs / UPDATEs / DELETEs on SQL Server table and logs to single table in JSON Format.
2017-12-22 (first published: 2017-12-01)
2,938 reads
This script capture INSERTs / UPDATEs / DELETEs on SQL Server table and logs to single table in JSON Format.
2017-12-22 (first published: 2017-12-01)
2,938 reads
Here is a script that can give the DBA a SQL Instance quick quality check.
2017-12-21 (first published: 2015-01-02)
7,065 reads
Script to grant a SQL a user read-only access to all the databases in Server instance except the system databases and
-- the Log shipped databases(if any : secondary :read-only)
2017-11-22 (first published: 2017-11-14)
23,546 reads
A function to truncate datetimes to month, quarter, hour etc and their multiples for convenient grouping
2017-11-21 (first published: 2017-11-14)
577 reads
https://github.com/ktaranov/sqlserver-kit/blob/master/Stored_Procedure/usp_BulkUpload.sql
2017-11-17 (first published: 2015-05-16)
5,232 reads
Get Logshipping report only when secondary is more than certain time behind Primary.
2017-11-14 (first published: 2017-10-27)
475 reads
With high transactions table the sys.syscommittab table does not gets deleted properly. Millions of backdated row remains. To delete the sys.syscommittab table below is the script.
2017-11-13 (first published: 2017-10-27)
914 reads
SQL Server procedure to script all tables in a given database to one or individual files on a given path.
2017-10-09 (first published: 2017-10-04)
2,923 reads
2017-10-05 (first published: 2017-10-02)
16,546 reads
Lists the job names and package names for jobs that execute SSIS packages (for packages stored in msdb).
2017-09-13 (first published: 2017-09-05)
2,030 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 Database Mail in SQL Server...
Comments posted to this topic are about the item Stairway to Reliable Database Deployment...
Comments posted to this topic are about the item QUOTENAME Quote Parameters
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