Rolling back transactions with cursors and local variables.
I’ve been doing some work on a credit card payment system lately. Obviously this needs to be robust and consistent...
2014-04-10
816 reads
I’ve been doing some work on a credit card payment system lately. Obviously this needs to be robust and consistent...
2014-04-10
816 reads
If you’re like me, you might be thinking “I want some more things to think about when I migrate between...
2014-03-27
682 reads
We all have blind spots in our knowledge. We don’t know they are there and when we are thinking through...
2014-03-13
752 reads
I’d be struggling to remember a week where I hadn’t run a query against the dmv sys.dm_db_index_usage_stats to find unused...
2014-03-10 (first published: 2014-02-27)
3,260 reads
Problem: You require the ability to perform a repeatable standardised installation of multiple instances of SQL Server or the ability...
2014-02-13
45,642 reads
The Problem: A legacy table contains amounts and a char column indicating whether the amount is a credit or a...
2014-02-11 (first published: 2014-02-04)
3,122 reads
It’s a well known fact that any sitcom that runs for a certain length of time will release a clip...
2014-01-13
1,702 reads
A while ago I blogged my about my approach to service packing a SQL Server 2008R2 active active cluster. Time...
2014-01-08
1,606 reads
I struck this error in one of my SSIS packages, I found lots of tips and suggestions online for the...
2014-01-08 (first published: 2014-01-06)
2,017 reads
The Setup:
Standard best practise is to have auto create and auto update statistics set for SQL Server databases. But there...
2013-09-03 (first published: 2013-08-28)
3,547 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