Google Fusion Table SQL查询where子句-仅AND有效,OR不有效? [英] Google Fusion Table SQL query where clause - only AND works, not OR?

查看:112
本文介绍了Google Fusion Table SQL查询where子句-仅AND有效,OR不有效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的SQL查询是:

SELECT * FROM 1910640 WHERE stype='P' OR stype='ERC' OR stype='PERC' ORDER BY ST_DISTANCE(geometry, LATLNG(-0.12623619999999391,51.5001524)) LIMIT 6

这将导致"parseerror".如果我将AND替换为AND,则查询返回成功:

This results in a "parseerror". If I replace OR with AND the query returns success:

SELECT * FROM 1910640 WHERE stype='P' AND stype='ERC' AND stype='PERC' ORDER BY ST_DISTANCE(geometry, LATLNG(-0.12623619999999391,51.5001524)) LIMIT 6

还有其他人遇到Fusion Tables并有解决方案/解决方法吗?

Anyone else ran into this with Fusion Tables and have a solution/workaround?

API文档确实暗示只允许AND,这让我感到非常惊讶. http://code.google.com/apis/fusiontables/docs/developers_guide .html#Querying

The API doc does imply only AND is allowed, which came as a big surprise to me. http://code.google.com/apis/fusiontables/docs/developers_guide.html#Querying

推荐答案

不支持OR-查看API ref filter_conditions

OR isn't supported - look at the API ref filter_conditions

支持IN-因此您可以输入SType的所有OR条件

IN is supported - so you can IN all your OR conditions for SType

这篇关于Google Fusion Table SQL查询where子句-仅AND有效,OR不有效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆