Domande taggate «sqldatatypes»

Riguarda i tipi di dati utilizzati con SQL.

2
Perché 199.96 - 0 = 200 in SQL?
Alcuni clienti ricevono bollette strane. Sono stato in grado di isolare il problema principale: SELECT 199.96 - (0.0 * FLOOR(CAST(1.0 AS DECIMAL(19, 4)) * CAST(199.96 AS DECIMAL(19, 4)))) -- 200 what the? SELECT 199.96 - (0.0 * FLOOR(1.0 * CAST(199.96 AS DECIMAL(19, 4)))) -- 199.96 SELECT 199.96 - (0.0 * …
Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.