How to re-create database quickly
I was running some database unit tests and needed to drop completely everyhing in my database. There are really many...
2011-07-04
703 reads
I was running some database unit tests and needed to drop completely everyhing in my database. There are really many...
2011-07-04
703 reads
Table Value Constructors were introduced in SQL Server 2008 and enables you to (not only) insert more records with one...
2011-06-29
994 reads
It is known that you cannot get inserted identity values using OUTPUT clause when inserting to view which has instead...
2011-06-28
1,874 reads
I was using user-defined tables types (UDTT) quite intensively despite of their current disadvantages especially their forced READONLY behavior when...
2011-06-23
3,918 reads
Red Gate’s SQL Source Control (RGSSC) is very decent solution source control solution for database development. I am personally using...
2011-06-23
3,063 reads
Many years back when ASP 2.0 (not ASP.NET) was used as primary server language for web application on Microsoft platform,...
2011-06-10
783 reads
I faced problem that I had many lookup tables like ProductType, ClientType etc. and wanted to refer to their values...
2011-06-05
1,797 reads
SSMS is abbreviation of SQL Server Management Studio, according to Microsoft description it is “an integrated environment for accessing, configuring,...
2011-06-03
734 reads
SQL Treeo is free add-in to SQL Server Management Studio (SSMS) which enables user to create own folder structures within...
2011-05-25
991 reads
By Steve Jones
A bit of a photo dump, but a few fun memories for me from...
By ReviewMyDB
Part 2 of my What's New in SQL Server for the Developer series. STRING_SPLIT,...
Note: This is more of a note to myself than an attempt to preach...
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