从表中提取特定值
我有 tabe:
As: 11 43 23 67 76
Bs: 87 38 70 8 10
syms:A`B where 4 4
AA:([] A:As;B:Bs)
1#select A from AA
我得到输出
A
--
11
我想知道如何只返回值而不是让输出成为表格?因此,在这种情况下,它只会返回 11。
I have the tabe:
As: 11 43 23 67 76
Bs: 87 38 70 8 10
syms:A`B where 4 4
AA:([] A:As;B:Bs)
1#select A from AA
I get the output
A
--
11
I would like to know how to just have the value returned instead of having the output to be a table? So, in this case, it would just return 11.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
众多方法之一
执行此操作以同时获取最后一项
或两项的
One of numerous ways to do this
to get last item
or both at once
当您希望将列值作为列表时,您需要使用
exec
关键字而不是select
:You want to use the
exec
keyword instead ofselect
when you want column values as a list:尝试使用 exec 而不是 select,它将仅返回列表中的值。
注意:如果查询位于 hdb 中/分区数据库中,那么您需要先选择,然后执行。
Try using exec instead of select, which will return just the value in a list.
Note: If the query is in a hdb / on a partitioned db then you'll need to select first then exec.