2012-10-04 (first published: 2012-04-10)
2,027 reads
2012-10-04 (first published: 2012-04-10)
2,027 reads
This code helps in finding Primary Keys for all tables in a database.
2012-10-02 (first published: 2012-09-04)
1,437 reads
2012-10-01 (first published: 2012-09-05)
2,595 reads
This script is used to get uptime for the SQL Server. (Supports SQL2005 and onwards only)
2012-09-28 (first published: 2012-09-07)
1,445 reads
How to get all actual word from a table,if I pass a jumbled word
2012-09-27 (first published: 2012-09-05)
831 reads
This is a script that I run when SQL starts to notify me via email that a server has restarted as well as the location of the server.
2012-09-25 (first published: 2012-08-29)
1,880 reads
This routine allows you to run VBScript directly from SQL (i.e. without having to create a file in advance) by pushing the script to a temp file.
2012-09-20 (first published: 2012-08-21)
995 reads
Stored Procedure will list all objects, object type, and linked server name. The stored procedure can either be passed in a linked server name as string or null.
2012-09-17 (first published: 2012-08-23)
1,063 reads
Powerful function to find strings containing or excluding classes of ASCII characters.
2012-09-10 (first published: 2012-08-28)
1,054 reads
2012-09-07 (first published: 2007-11-15)
3,497 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