如何解决元数据库 - 字段过滤器作为文本
我有这个 SQL 查询:
select concept,count(*)
from annotation
where exists (select 1
from annotation a2
where a2.comment_commentid = annotation.comment_commentid and a2.concept = 'Fatigue'
)
group by concept;
我想用{{word}}替换'Fatigue',做一个过滤小部件,从数据库映射到列。 我有以下错误:
错误:“=”位置或附近的语法错误:307
我需要改变什么来应用过滤器?从该列中选择可用的词? 使用变量类型作为文本它可以工作...但不要在过滤器中显示所有可用选项,因为变量类型字段过滤器做...
谢谢!
解决方法
outer annotation
表也需要别名。如有疑问,inner 作用域总是在解析名称时占优势,inner exists(...)
也在作用域内查询 annotation
名称)
[你的错误原因可能是中间件混淆了]
select concept,count(*)
from annotation a1 -- <<-- HERE!
where exists (select 1
from annotation a2
where a2.comment_commentid = a1.comment_commentid and a2.concept = 'Fatigue'
)
group by concept;
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。