QTP - ADO Recordset - SQL查询修剪列的十进制值

时间:2016-12-09 21:57:02

标签: vbscript ado qtp recordset

执行sql查询时,结果字段返回QTP中没有小数值的值。

Database_GetValue = Recordset(fieldname)返回没有小数位的值。例如:114.45被拉为114.如何获得该字段的完整值

searchQuery = "SELECT SUM(ddwhrw) ""Hours"" FROM fbfiles.ttp151 WHERE ddname<>'' and DDTID# = 001 and ddday# = 20161206"

1 个答案:

答案 0 :(得分:-1)

this duplicate question中所述,将您的查询从SUM(ddwhrw)更改为CAST(SUM(ddwhrw) AS DOUBLE)