On executing a sql query, the results field returns value without decimal values in QTP.
在执行sql查询时,结果字段在QTP中返回不带小数值的值。
Database_GetValue = Recordset(fieldname)
is returning a value without decimal places. Ex : 114.45 is being pulled as 114. How can I get the complete value of the field
Database_GetValue = Recordset(fieldname)返回一个没有小数位的值。例如:114.45被拉为114.如何获得该领域的完整价值
searchQuery = "SELECT SUM(ddwhrw) ""Hours"" FROM fbfiles.ttp151 WHERE ddname<>'' and DDTID# = 001 and ddday# = 20161206"
searchQuery =“SELECT SUM(ddwhrw)”“Hours”“FROM fbfiles.ttp151 WHERE ddname <>''和DDTID#= 001 and ddday#= 20161206”
1 个解决方案
#1
-1
Change your query from SUM(ddwhrw)
to CAST(SUM(ddwhrw) AS DOUBLE)
as mentioned in this duplicate question.
如此重复问题中所述,将查询从SUM(ddwhrw)更改为CAST(SUM(ddwhrw)AS DOUBLE)。
#1
-1
Change your query from SUM(ddwhrw)
to CAST(SUM(ddwhrw) AS DOUBLE)
as mentioned in this duplicate question.
如此重复问题中所述,将查询从SUM(ddwhrw)更改为CAST(SUM(ddwhrw)AS DOUBLE)。