How should I store currency values in SQL Server?
On Twitter, Michael Dyrynda writes: ?? Never ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever...
2020-06-03
315 reads
On Twitter, Michael Dyrynda writes: ?? Never ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever...
2020-06-03
315 reads
In this post we look at how SQL Server stores currency values using the MONEY and SMALLMONEY data types. If you’d like to read the previous posts in this...
2020-05-27
15 reads
As longtime readers know, I am also a software developer (we can’t call them engineers in Canada for legal reasons). I took over a complex codebase last year in...
2020-05-20
270 reads
Last time we looked at the internals of how dates and times are stored in SQL Server. This week we’re going to look at how numbers are stored. This...
2020-05-13
97 reads
A quick(er) post this week, in response to Greg Low’s blog post from a few weeks ago titled “Don’t start identity columns or sequences with large negative values.” Greg...
2020-05-06
204 reads
In 2018, I entered Speaker Idol at the PASS Summit, and because I forgot to start my timer I was disqualified for running over the five-minute limit (say “five-minute...
2020-04-29
6 reads
This post dives into how SQL Server stores date and time data types in memory and on disk. But first, a note about endianness: CPUs manufactured by Intel and...
2020-04-22
155 reads
Erik Darling, of Erik Darling Data (blog | Twitter) recently posted a very interesting video (my YouTube playlist is all Erik Darling Data videos and Honest Trailers). In this...
2020-04-15
18 reads
I will be presenting a session to the Adelaide SQL Server User Group on April 15th, 2020, and if you’re awake at that time (it’ll be 9pm on April...
2020-04-08
49 reads
WARNING: This post contains information that can get you fired if you use it without express written permission. In some jurisdictions it might get you jail time as well....
2020-04-01
43 reads
You can find the slides of my session on the €100 DWH in Azure...
By Steve Jones
This value is something that I still hear today: our best work is done...
By gbargsley
Have you ever received the dreaded error from SQL Server that the TempDB log...
Hi everyone I am writing an SP where there is logic inside the SP...
Comments posted to this topic are about the item Planning for tomorrow, today -...
We have a BI-application that connects to input tables on a SQL Server 2022...
I try to run this code on SQL Server 2022. All the objects exist in the database.
CREATE OR ALTER VIEW OrderShipping AS SELECT cl.CityNameID, cl.CityName, o.OrderID, o.Customer, o.OrderDate, o.CustomerID, o.cityId FROM dbo.CityList AS cl INNER JOIN dbo.[Order] AS o ON o.cityId = cl.CityNameID GO CREATE OR ALTER FUNCTION GetShipCityForOrder ( @OrderID INT ) RETURNS VARCHAR(50) WITH SCHEMABINDING AS BEGIN DECLARE @city VARCHAR(50); SELECT @city = os.CityName FROM dbo.OrderShipping AS os WHERE os.OrderID = @OrderID; RETURN @city; END; goWhat is the result? See possible answers