为什么这个计算没有给我结果

huangapple go评论88阅读模式
英文:

Why is this Calculation not giving me a result

问题

我创建了一个ExecuteSQL计算:

ExecuteSQL("SELECT BaseRent FROM obj_Unit_CurrentRenter_RentAmount WHERE RenterUnitID = ? AND CurRent = 1"; ""; ""; RenterUnitID)

我已经验证了,当我去掉 AND CurRent = 1 子句时它是有效的。然而,带有这部分的计算返回一个?。

CurRent是一个数字字段。

英文:

I created an ExecuteSQL Calculation:

ExecuteSQL ( "SELECT BaseRent FROM obj_Unit_CurrentRenter_RentAmount WHERE RenterUnitID = ? AND CurRent  = 1" ; "," ; ""; RenterUnitID)

I've verified that is works when I take out the AND CurRent = 1 clause. However, with that part in it, the calculation returns a ?.

CurRent is a Number field.

答案1

得分: 1

问题在于你的字段名CurRent与保留字CURRENT冲突。

将你的公式更改为:

ExecuteSQL("SELECT BaseRent FROM obj_Unit_CurrentRenter_RentAmount WHERE RenterUnitID = ? AND \"CurRent\" = 1" ; "," ; ""; RenterUnitID)
英文:

The problem is that your field name CurRent collides with the reserved word CURRENT.

Change your formula to:

ExecuteSQL ( "SELECT BaseRent FROM obj_Unit_CurrentRenter_RentAmount WHERE RenterUnitID = ? AND \"CurRent\"  = 1" ; "," ; ""; RenterUnitID)

huangapple
  • 本文由 发表于 2023年2月7日 04:25:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/75366206.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定