Script to find Disk Space including Mount points
works two different ways using sql for 2000 and 2005 and powershell for 2008.
2012-05-23 (first published: 2012-05-01)
5,797 reads
works two different ways using sql for 2000 and 2005 and powershell for 2008.
2012-05-23 (first published: 2012-05-01)
5,797 reads
Find a string in any "string" (char, varchar, nchar etc) column in the database.
2012-05-22 (first published: 2007-12-19)
5,678 reads
2012-05-22 (first published: 2012-05-01)
821 reads
Calculates the nth due date for any given date, while accounting for weekends.
2012-05-16 (first published: 2007-10-11)
3,759 reads
This script maps the primary key - foreign key relations regardless if the column names are the same or not.
2012-05-15 (first published: 2007-11-07)
2,968 reads
A script to generate a recovery script for setting your sa account back to the password it is using at the time of running this script.
2012-05-14 (first published: 2012-04-09)
989 reads
Searches database for up to 4 keywords. It will search through SPs, UDFs, Triggers, SSIS packages, jobs, table names, and column names.
2012-05-10 (first published: 2012-04-18)
2,188 reads
2012-05-09 (first published: 2012-04-19)
1,353 reads
An interesting recursive CTE to list out the non-alphanumeric characters in a column of a table.
2012-05-08 (first published: 2012-04-12)
3,014 reads
This script lets you to know how much disk space will be left after the next database grow taking in account the free space left in the database.
2012-05-08 (first published: 2011-09-13)
1,016 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...
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