Mechanism To Dynamically Build Pivot Table
Script to build PIVOT queries with an arbitrary number of columns
2018-10-25 (first published: 2018-10-15)
1,031 reads
Script to build PIVOT queries with an arbitrary number of columns
2018-10-25 (first published: 2018-10-15)
1,031 reads
A script we use in our company, that rebuilds online=on by default, but takes care of special exceptions.
2016-07-28 (first published: 2014-06-06)
2,433 reads
2013-06-06 (first published: 2009-03-16)
2,673 reads
If you ever need a quick way to generate random passwords, this is a pretty useful way to do so.
2013-05-15 (first published: 2008-09-24)
3,399 reads
Using opendatasource to retrieve data from Excel files as if querying a table.
2011-03-22 (first published: 2009-01-27)
11,944 reads
Sometimes you need to scan a large number of datetime columns for most recent access.
2010-06-08 (first published: 2010-05-04)
1,908 reads
A hopefully useful script to delete old files, not just backups, and make use of the archive bit.
2009-01-01 (first published: 2008-12-09)
2,538 reads
A quick way to get a snapshot of what data types are being used in all user tables.
2008-12-04 (first published: 2008-10-02)
1,149 reads
2008-11-06 (first published: 2008-09-12)
1,127 reads
A short script you can incorporate into any 2005/2008 code to get the full schema.table.
2008-09-29
684 reads
By Steve Jones
I’ve become an EV guy. I was talking with a friend who was selling...
In a previous post I talked about how we can use T-SQL Snapshot Backups...
By Steve Jones
A bit of a photo dump, but a few fun memories for me from...
Comments posted to this topic are about the item How to connect your SQL...
Comments posted to this topic are about the item Finding the Black Friday Sales...
Earlier this week I had an issue with a Win 8.1 laptop I was...
We are tracking sales for Black Friday today. We have these aggregate values:
CREATE TABLE dbo.BlackFridaySales
(
Product NVARCHAR(50) NOT NULL PRIMARY KEY,
Units INT NOT NULL
);
INSERT INTO dbo.BlackFridaySales (Product, Units)
VALUES (N'55" TV', 900),
(N'Air Fryer', 500),
(N'Noise-Cancel Headphones', 500),
(N'Robot Vacuum', 300);
I'm trying to get a ranking of the sales that would return 1, 2, 2, 3 for the product levels. Which query does this? See possible answers