[英]JSL select Query with keyword and parantheses
I am trying to select specific values from a column in JSL, but there is an issue. 我正在尝试从JSL中的列中选择特定的值,但是有一个问题。 The column name is: 列名是:
Sum(ow_blah)
And I would like to: select where(Sum(ow_blah) == 0)
我想: select where(Sum(ow_blah) == 0)
Unfortunately, the combination of the keyword Sum
and parentheses have led to significant problems. 不幸的是,关键字Sum
和括号的组合导致了严重的问题。 And Aliasing is not allowed in select
statements. 并且select
语句中不允许混叠。 How can I use the Sum
function within a where
clause? 如何在where
子句中使用Sum
函数?
Use HAVING
after grouping, as in: HAVING
后使用HAVING
,如下所示:
select id, sum(ow_blah)
from my_table
group by id
having sum(ow_blah) = 0
Since "sum" is a keyword, you need to explicitly let JMP know that you are selecting a column by the name Sum(ow_blah). 由于“ sum”是关键字,因此您需要明确让JMP知道您正在选择名称为Sum(ow_blah)的列。 So for that, use it as: 因此,将其用作:
Column("Sum(Ow_blah)")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.