0

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

DapperDanh
  • 555
  • 2
  • 5
  • 17

1 Answers1

1

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.

6c00h
  • 89
  • 8
  • yes, it does indeed work. the execution plan shows that it translated into multiple calls and then union the results. so it works, but would be slightly slower. – DapperDanh Feb 08 '23 at 18:00