0

To achieve better performance I want to store percent value with two digits after floating point as integer. E.g. 99.99% as 9999. How can I convert back 9999 to 99.99%? I cannot recompile my java code to do this in Java according to some security reasons. So, how can I do this using HQL formula in my externalized mappings files? Thanks!

4

1 回答 1

0

对于 MySQL 5.5 工作:

连接(值 / 100.0,'%')

cast(a.percentValue AS double)/100

因 MySQLSyntaxErrorException 而失败

于 2012-07-18T13:44:13.037 回答