|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622 。
您需要 登录 才可以下载或查看,没有帐号?注册
x
The query will always return six (6) decimal places for the VAT values regardless of the settings in the database (Administration -> System Initialisation -> General Settings -> Display tab).
In order to round the values, it is necessary to cast and convert them. They will then appear as alphanumeric instead of numeric.
This example shows how to round to three decimal places.
Convert (char(18),(cast ((round(T0.Vatsum, 3)) as decimal(16,3)))) \\round(T0.Vatsum, 3)
This rounds the figures to 3 decimal places. However, as it is still a numeric value, the rounding will be ignored.
cast ((round(T0.Vatsum, 3)) as decimal(16,3))
This specifies the desired format with decimals and the number of digits required after the decimal point testing.
Convert (char(19),(cast ((round(T0.Vatsum, 3)) as decimal(16,3))))
The data will no longer be seen as numeric but as alphanumeric. Therefore, the display will show the value with the specified rounding.
 |
|