The Case for Scalar-valued, User-defined Functions in T-SQL
Did you know that scalar-valued, user-defined functions can be used in DEFAULT/CHECK CONSTRAINTs and computed columns? Learn about it...
2015-05-12
7,342 reads
Did you know that scalar-valued, user-defined functions can be used in DEFAULT/CHECK CONSTRAINTs and computed columns? Learn about it...
2015-05-12
7,342 reads
Today we’re going to try to extend some advice that I once heard from SQL MVP Jeff Moden, which I...
2015-05-04 (first published: 2015-04-23)
9,244 reads
Today’s blog will be the first in a multi-part series on replicating Excel functions in T-SQL, starting with HARMEAN, GEOMEAN...
2015-04-29
2,329 reads
Today we’ll learn how you can use T-SQL to calculate your zodiac sign from your birthdate.
“Heeeeeere’s Johnny!” – Ed McMahon introducing...
2015-04-16
1,360 reads
Back in 2013 I wrote an article kindly accepted for publication on the Simple Talk web site called Calculating the...
2015-04-08
901 reads
If you've never encountered this quirk of the SQL UPDATE statement, you should take a look and find a simple way around it.
2015-04-06 (first published: 2013-09-09)
27,923 reads
Since Easter is nearly upon us, I got to thinking once again about how challenging it is to calculate the...
2015-03-31
3,798 reads
When effective end dates don't align properly with effective start dates for subsequent rows, what are you to do?
2015-03-24
10,693 reads
It is a “common knowledge” among SQL practitioners that VIEWs don’t perform well. Recently during an application’s development I put...
2015-03-20 (first published: 2015-03-12)
8,942 reads
“Heeeeeere’s Johnny!” – Ed McMahon introducing Johnny Carson for the Tonight Show
If you’re old enough to remember the Tonight Show hosted...
2015-03-19
781 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