tvanstiphout
Active member
- Local time
- Today, 07:29
- Joined
- Jan 22, 2016
- Messages
- 401
A365-32 semi-annual, v2408. Using classic SQL editor.
Experiment 1:
Select CSng(Nz([Ingredients].[MaxQty],[Ingredients].[Qty])) AS IngredientQty From …
Experiment 2:
Select Round(CSng(Nz([Ingredients].[MaxQty],[Ingredients].[Qty])),3) AS IngredientQty From …
Both return the exact same value: 1.00000004749745E-03
I expected the second one to return 3 decimals.
In the Immediate window, it works correctly:
?Round(1.00000004749745E-03,3)
0.001
Ingredients.MaxQty and Ingredients.Qty are nullable single in the attached table; real in the SQL Server table (attached via ODBC 18).
If I add a column to the query: Round(1.00000004749745E-03,3), then it is rounded as expected.
What could be going on?
Experiment 1:
Select CSng(Nz([Ingredients].[MaxQty],[Ingredients].[Qty])) AS IngredientQty From …
Experiment 2:
Select Round(CSng(Nz([Ingredients].[MaxQty],[Ingredients].[Qty])),3) AS IngredientQty From …
Both return the exact same value: 1.00000004749745E-03
I expected the second one to return 3 decimals.
In the Immediate window, it works correctly:
?Round(1.00000004749745E-03,3)
0.001
Ingredients.MaxQty and Ingredients.Qty are nullable single in the attached table; real in the SQL Server table (attached via ODBC 18).
If I add a column to the query: Round(1.00000004749745E-03,3), then it is rounded as expected.
What could be going on?