Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
たとえば、合計 4.00 ドルのトマトが 1000 個あります。これは0.004トマトあたりになります。私のデータ型はdecimal (9,2).
0.004
decimal (9,2)
その値を に切り上げたい場合0.01、どうすればそれを達成できますか?
0.01
Select Round(CEILING(0.004 * 100)/100,2)
select case when cast(4.00/1000 as decimal(9,2)) < 0.01 then 0.01 else cast(4.00/1000 as decimal(9,2)) end