$ where子句中的多个函数

时间:2015-06-16 22:33:10

标签: socrata soda

我正在为CMS数据查询构建一个url。我得到以下工作就好了:

    https://data.cms.gov/resource/din4-7td8.json?$$app_token=REDACTED&$where=(starts_with(nppes_provider_zip,'63703') OR starts_with(nppes_provider_zip,'63701')) AND (hcpcs_code='31623' OR hcpcs_code='31622')

当我尝试替换调用多个hcpcs_code值时,我得到一个query.compiler.malformed错误。以下内容生成错误:

    https://data.cms.gov/resource/din4-7td8.json?$$app_token=REDACTED&$where=(starts_with(nppes_provider_zip,'63703') OR starts_with(nppes_provider_zip,'63701') AND hcpcs_code in('31622','31623'))

我是否可能错误地使用了in(...)函数?

1 个答案:

答案 0 :(得分:0)

我想在你提出这个问题之后我可能已经抓住了你on IRC,但我也会在这里回答。

您似乎正在使用不支持IN(...)功能的旧API版本的API端点。如果您迁移到该数据集API的新版本,则可以发出查询: