这是查询的一部分:
(end_date - load_date)*tester_money/(load_date - start_date)
错误:
错误:CASE / WHEN无法将类型转换为整数LINE 115:
什么时候load_date - start_date> 28那么tester_money ......
如何使这项工作?
tester_money
属于money
类型,日期属于date
类型。
答案 0 :(得分:0)
Think of money as a locale dependent text string. You would have to cast it back to numeric in order to do your calculation. tester_money::numeric
Check out the following link http://www.postgresql.org/docs/current/static/datatype-money.html