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
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