英文:
Denodo Json Source and Base View: how to make VQL more traditional SQL syntax
问题
我有一个web服务API
在Denodo中,我虚拟化了以下API:
https://delphi.cmu.edu/epidata/fluview/?regions=nat&epiweeks=201501,201601,201701
作为
https://delphi.cmu.edu/epidata/fluview/?regions=@{regions}&epiweeks=@{epiweeks}
这使我们在Denodo中能够这样写:
Select * from bv_fluview where epiweeks = '201501,201601,201701' and regions = 'nat'
是否有任何方法可以以更传统的方式编写查询,例如:
Select * from bv_fluview where epiweeks in ('201501','201601','201701') and regions = 'nat'
我对Denodo相对新手。
谢谢,
丹
英文:
I have a web service api
In Denodo, I have virtualized the following api:
https://delphi.cmu.edu/epidata/fluview/?regions=nat&epiweeks=201501,201601,201701
as
https://delphi.cmu.edu/epidata/fluview/?regions=@{regions}&epiweeks=@{epiweeks}
This allows us, in Denodo, to write the following:
Select * from bv_fluview where epiweeks = '201501,201601,201701' and regions = 'nat'
Is there any way where the query could be written in a more traditional way such as:
Select * from bv_fluview where epiweeks in ('201501','201601','201701') and regions = 'nat'
I am relatively new to Denodo.
Thanks,
Dan
答案1
得分: 1
在Denodo中,您可以使用IN子句来检查一个值是否存在于列表中:
SELECT *
FROM bv_fluview
WHERE epiweeks IN ('201501','201601','201701')
AND regions = 'nat';
这将返回与您原始查询相同的结果,但使用了更传统的IN操作符语法。
英文:
In Denodo, you can use the IN clause to check if a value is present in a list
SELECT *
FROM bv_fluview
WHERE epiweeks IN ('201501','201601','201701')
AND regions = 'nat'
This would return the same result as your original query but with a more conventional syntax for the IN operator.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论