2024-11-25
166 reads
2024-11-25
166 reads
An in depth look at the implications of using Banker's Rounding.
2020-06-15
18,062 reads
As SQL developers, we tend to think of performance tuning in terms of crafting the best table indices, avoiding scalar and table valued functions, and analyzing query plans (among other things). But sometimes going back to the spec and applying some properties of elementary math can be the best way to begin to improve performance of SQL queries which implement mathematical formulas. This article is a case study of how I used this technique to optimize my SQL implementation of the Inverse Simpson Index.
2021-05-07 (first published: 2019-09-12)
5,374 reads
How we can use SQL to solve a math problem published in The Guardian...but with a caution about implicit type conversion.
2015-07-14
7,472 reads
3 functions that implement the left (<<), right (>>) and unsigned right (>>>) shift operators, commonly found in C-style languages.
2012-02-15 (first published: 2011-12-30)
8,066 reads
Here’s a way to centralize management, rotate secrets conveniently without downtime, automate synchronization and...
This may or may not be helpful in the long term, but since I’m...
By Steve Jones
“I’m sick of hearing about Red Gate.” The first article in the book has...
Comments posted to this topic are about the item Dynamic T-SQL Script Parameterization Using...
When I log into my instance of SQL Server, there are many databases. I'm...
I have read that the collation at the instance level cannot be changed. I...
In SQL Server 2022, I run this code:
CREATE SEQUENCE myseqtest START WITH 1 INCREMENT BY 1; GO CREATE TABLE NewMonthSales (SaleID INT , SecondID int , saleyear INT , salemonth TINYINT , currSales NUMERIC(10, 2)); GO INSERT dbo.NewMonthSales (SaleID, SecondID, saleyear, salemonth, currSales) SELECT NEXT VALUE FOR myseqtest , NEXT VALUE FOR myseqtest , ms.saleyear , ms.salemonth , ms.currMonthSales FROM dbo.MonthSales AS ms; GO SELECT * FROM dbo.NewMonthSales AS nmsAssume the dbo.MonthSales table exists. If I run this, what happens? See possible answers