The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
0answers
21 views

Migration error: “Invalid date literal detected” when reading decimal

I'm attempting a migration from MSSQL to MySQL and keep coming across a "Invalid date literal detected" error when reading certain decimal columns. I'm running the following (all up-to-date as of ...
4
votes
4answers
390 views

How does SQL Server determine precision / scale?

I'm running SQL Server 2012 SELECT 0.15 * 30 / 360, 0.15 / 360 * 30 Results: 0.012500, 0.012480 This one is even mor confusing to me: DECLARE @N INT = 360 DECLARE @I ...
3
votes
1answer
126 views

Why doesn't `1` fit into a decimal(4, 4) column?

I have a decimal(4, 4) column in MS SQL Server 2008 R2. If I understand correctly, that means: Precision of 4, ie up to four digits can be stored after the decimal place Scale of 4, ie a a total of ...
7
votes
1answer
5k views

Automatic decimal rounding issue

The question is relatively simple. I need to calculate 3 columns where the mid results are huge decimals, and I'm running into a problem early on with SQL Server basically rounding the decimals ...